Jump to content

AtkShuttleRelation

From NusaATK
Revision as of 14:00, 13 March 2007 by Jeroenvs (talk | contribs) (added picture)

An atkShuttleRelation extends the atkManyToManyRelation. The relation shows two lists, one with elements that are currently linked to the master record, and one with available records to choose from. A many-to-many relation uses an intermediate table.

If you do not want to use the default primary keys, you can override them by using the functions:

setLocalKey("a_id");
setRemoteKey("b_id");


Example

One person (node A) can have several skills (node B) and the same skill applies to more than one person.


Be careful when using the AF_HIDE flag in the itermediate (A_B) node for the atkManyToOneRelation, in combination with multilanguage fields. When a relation is hidden, the key (a_id) will not be processed and no check on the language is done. This causes the added record to appear multiple times (once for every language), since a_id is not unique in the intermediate table.