Taher, Thank you for th detailed explainatin. I understand the purpose of party_role, and asking why do we link party_relatinship to party, rather than party_role.
Party_role entity contains partyIDs and roles types, still we duplicate this infomation in party_relationship. I hope this clarifies the source of confusion. The explaination in the book was not clear to me either. Thank you for any help. On 2014-10-11 6:48 PM, "Taher Alkhateeb" <[email protected]> wrote: > Hi Mansour, > > Simply speaking the party_role entity assigns roles to parties which can be > applied to many entities among which one of them is party_relationship. For > example, WorkEffortPartyAssignment links a party to a workeffort through a > role. Thus the partyrole is an entity to be (depending on some factors) > used for validation of the existence of the role before assigning it to one > of the relationship entities. At least that's my interpretation of it. > > Taher Alkhateeb > On Oct 12, 2014 12:58 AM, "Mansour Al Akeel" <[email protected]> > wrote: > > > I consulted the Data Model Resource Book to refresh my memory about > > the modelling for the roles and relationship for Party. > > > > In ofbiz, we have PartyRelationship between two parties. So each party > > ID is used as a key, combined with the relationship type. The book > > mentions on page 42, that when customizing the model, it's recommended > > to draw the relationship between party roles. > > > > The part that I find confusing is, if we have the two party IDs in the > > party_role entity, why don't we create the relationship between two > > party roles, instead of duplicating the information in the > > party_relationship entity ? For example, currently we have, > > > > party_relationship: > > - from party id > > - to party id > > - from role type id > > - to role type id > > - start date > > - end date ..... > > > > Can't we just use, > > party_relationship: > > -from role > > - to role > > - party relationship type > > > > assuming John has the role of developer. IBM has the role of employer. > > We can use the directly in the party relationship. Using the current > > model, we need to add the role_type to the party_relationship. If John > > is no longer a developer, then we need to update in two entities, the > > party_relationship, and the roles. > > > > I am not sure I understand the description in the book, and the design in > > ofbiz. > > > > Can someone kindly clarify the picture for me ?? > > > > Thank you. > > >
