How to model party relationship data in ofbiz?

浪尽此生 提交于 2019-12-04 16:00:50

A PARTY RELATIONSHIP joins only two other entities:

1) A PARTY RELATIONSHIP TYPE which associates two ROLE TYPES: e.g. supplier to customer or employee to department.

2) The actual PARTIES participating in the relationship ROLES: e.g. ABC COMPANY as supplier and Thang Nguyen as customer.

These parties in their respective roles are what's represented by the PARTY ROLE entity.

This PARTY ROLE entity may be expressed in a table, in which case you would have PARTY ROLE ID's for each of the two parties in the relationship. Or the party role may not have a separate table and only be realized in the Party Relationship table, in which case it will have, as you specify, a PARTY and ROLE TYPE ID for each of the parties in the relationship.

You won't have duplicate data in the PARTY RELATIONSHIP entity because FROM DATE is part of the key and would be unique in combination with the two PARTY ROLES.

The from and to dates are for that party relationship, not party relationship type.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!