AtkManyToOneRelation: Difference between revisions
Appearance
No edit summary |
|||
| Line 2: | Line 2: | ||
== atkManyToOneRelation == | == atkManyToOneRelation == | ||
If you do not want to use the default primary keys (for example when the * side has a combined PK), you can override them by using the functions: | If you do not want to use the default primary keys (for example when the * side has a combined PK), you can override them by using the functions: | ||
<syntaxhighlight lang="php"> | |||
setLocalKey("a_id"); | setLocalKey("a_id"); | ||
setRemoteKey("b_id"); | setRemoteKey("b_id"); | ||
</syntaxhighlight> | |||
'''Example''' | '''Example''' | ||
Revision as of 17:20, 19 August 2008

atkManyToOneRelation
If you do not want to use the default primary keys (for example when the * side has a combined PK), you can override them by using the functions:
setLocalKey("a_id");
setRemoteKey("b_id");
Example
Projects all have one coordinator (node B), but one coordinator can have multiple projects (node A). So in the project class, there's a atkManyToOneRelation to a coordinator.
