+------+     +------+     +-------+
| Film | --> | Role | <-- | Actor |
+------+     +------+     +-------+


Relation n-m no extra stuff in link table
=========================================
Table Film
*id
 name
Table Person
*id
 name

Table Actor
*film_id
*person_id


$film->fieldname('actors',$person_id);
<input name="cdbi|Role|film_id=1;person_id=2"
       value="Dummy value"
       type="text" />
+ $ hidden field


$person->fieldname('films',$film_id);
<input name="cdbi|Actor|film_id=1;person_id=2"
       value="1"
       type="hidden" />


Will do: insert/update/delete actors (film_id,person_id) values (1,2);

Delete if only one value selected or by ids.

Relation n-m with extra stuff in link table
===========================================
Table Actor
*film_id
*person_id
 role

$actor->fieldname('role',person_id => $person_id, film_id => $film_id);

<input name="cdbi|Actor|film_id=1;person_id=2|role"
       value="Cabanaboy"
       type="text" />

Will do: insert/update/delete actors (film_id,person_id,role) values
(1,2,'Cabanaboy');

You delete it by ids.