Posted by
Vinay Agarwal on
Mar 09, 2006; 12:54am
URL: http://ofbiz.116.s1.nabble.com/Users-Understanding-getRelatedXXX-functions-tp137835p137837.html
Thanks David. I had read it before but didn't register it.
-----Original Message-----
From:
[hidden email] [mailto:
[hidden email]]
On Behalf Of David E. Jones
Sent: Wednesday, March 08, 2006 4:24 PM
To: OFBiz Users / Usage Discussion
Subject: Re: [OFBiz] Users - Understanding getRelatedXXX functions
No, as described in the Entity Engine Guide the relationship name
(used in the getRelated* methods) is the title plus the related
entity name. The only reason there are getRelatedOne* methods is to
return a single GenericValue object versus a list (ie do a
findByPrimaryKey instead of findByAnd).
-David
On Mar 8, 2006, at 5:09 PM, Vinay Agarwal wrote:
> Hello,
>
>
> I am getting confused on how do getRelatedXXX functions work. I
> would appreciate clarification. Part of the UserLogin relations are
> copied below. Are the following statements correct?
>
>
> getRelatedOne("Party") would get the entity in row 1.
> getRelated("Party") would get both entities in last two rows.
>
> Thanks in advance.
>
> Regards,
>
> Vinay Agarwal
>
>
> Relations
> for entity UserLogin
>
> Title
>
> Related Entity
>
> Relation Type
>
> FK Name
>
> Key Map
>
>
> Party
>
> one
>
> USER_PARTY
>
> partyId -> partyId
>
>
> Person
>
> one-nofk
>
>
> partyId -> partyId
>
>
> PartyGroup
>
> one-nofk
>
>
> partyId -> partyId
>
> CreatedBy
>
> ContactList
>
> many
>
>
> userLoginId -> createdByUserLogin
>
> LastModifiedBy
>
> ContactList
>
> many
>
>
> userLoginId -> lastModifiedByUserLogin
>
> CreatedBy
>
> Content
>
> many
>
>
> userLoginId -> createdByUserLogin
>
> LastModifiedBy
>
> Content
>
> many
>
>
> userLoginId -> lastModifiedByUserLogin
>
> .
>
>
>
>
>
> CreatedBy
>
> Party
>
> many
>
>
> userLoginId -> createdByUserLogin
>
> LastModifiedBy
>
> Party
>
> many
>
>
> userLoginId -> lastModifiedByUserLogin
>
>
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
>
[hidden email]
>
http://lists.ofbiz.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users