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.
