Add a dwcorator method that looks them up.

Sent from my iPhone

On Sep 26, 2009, at 8:20, Erik-Jan Jaquet <[email protected]> wrote:

> Hi Mark,
>
> The manytoone relationship does work, but I need to know which tasks  
> are assigned to a user. And with a many to one I just get the user  
> methods in the taskobject, but no task data in the user object.
>
> How do I go about that?
>
> Erik-Jan
>
> 2009/9/26 Mark Mandel <[email protected]>
> Sounds like a many to one relationship
>
> Many Tasks have one User.
>
> No?
>
> Mark
>
>
> On Sat, Sep 26, 2009 at 6:32 PM, EJ Jaquet <[email protected]> wrote:
>
> 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
>
>
>
>
> -- 
> E: [email protected]
> T: http://www.twitter.com/neurotic
> W: www.compoundtheory.com
>
>
>
>
>
>
> >

--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to