EJ Jaquet
unread,Sep 26, 2009, 4:32:01 AM9/26/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to transfer-dev
Hi all,
I have a question on how to solve a problem with one-to-many's. I have
a user table, a task table and a contact table.
Both the contact table and the task table have a assigned-to-user,
modified-by-user and created-by-user, which point to the user table.
All fields are foreign keys to the user.userid field.
How do I put this in my Transfer file? I have created all the one-to-
many's like this: <onetomany name="task_created_by">
<link to="task.task" column="created_by_user_id" />
<collection type="array" >
<order property="subject" order="asc" />
</collection>
</onetomany>
<onetomany name="task_assigned_to">
<link to="task.task" column="assigned_user_id" />
<collection type="array" >
<order property="subject" order="asc" />
</collection>
</onetomany>
<onetomany name="task_modified_by">
<link to="task.task" column="modified_user_id" />
<collection type="array" >
<order property="subject" order="asc" />
</collection>
</onetomany>
But then I get a parentuser that only holds the last userid, the
modified-user.
I want to have the task that are assigned to a user available, and i
need to know which user is assigned to a task, so I think I need the
one-to-many relationship.
How do you guys handle this?
Erik-Jan