Party classifications can be used in a number of ways - marketing
campaigns and employee classifications are two uses that come to mind.
So, I could have a marketing campaign that targets families and
therefore includes the "Family" party classification. Another marketing
campaign might target corporations, so it would include the
"Corporation" party classification.
How am I being vague? I have cited the book, and in the previous
discussion I gave a very detailed use-case scenario that demonstrated
how the current model doesn't work and the book's model works. Maybe you
could spend some time going over that thread again.
Where am I going with this? As the thread's subject says, I'm discussing
data model improvements.
-Adrian
On 3/29/2011 11:27 AM, David E Jones wrote:
Hmmmm.... PartyType has the following data in OFBiz:
<PartyType description="Automated Agent" hasTable="N" parentTypeId=""
partyTypeId="AUTOMATED_AGENT"/>
<PartyType description="Person" hasTable="Y" parentTypeId=""
partyTypeId="PERSON"/>
<PartyType description="Party Group" hasTable="Y" parentTypeId=""
partyTypeId="PARTY_GROUP"/>
<PartyType description="Informal Group" hasTable="N" parentTypeId="PARTY_GROUP"
partyTypeId="INFORMAL_GROUP"/>
<PartyType description="Family" hasTable="N" parentTypeId="INFORMAL_GROUP"
partyTypeId="FAMILY"/>
<PartyType description="Team" hasTable="N" parentTypeId="INFORMAL_GROUP"
partyTypeId="TEAM"/>
<PartyType description="Legal Organization" hasTable="N" parentTypeId="PARTY_GROUP"
partyTypeId="LEGAL_ORGANIZATION"/>
<PartyType description="Corporation" hasTable="N" parentTypeId="LEGAL_ORGANIZATION"
partyTypeId="CORPORATION"/>
<PartyType description="Government Agency" hasTable="N"
parentTypeId="LEGAL_ORGANIZATION" partyTypeId="GOVERNMENT_AGENCY"/>
Those don't look at ALL like the classifications mentioned in the book. The book mentions
classification types such as "Income" and the actual classification would be something
like "$20K-$40K".
How is "$20K-$40K" like "Family"?
I still have no idea where you're going with this... and I feel like as like as
you respond with vague generalizations it's going to take a LOT of me
responding with details to make up for that.
-David
On Mar 29, 2011, at 12:08 PM, Adrian Crum wrote:
Yes, we have been over this before, and no, I'm not forgetting anything about
the PartyType entity.
Look at the PartyType demo data - what does it contain? It contains party
classification types. Whether the PartyEntity was originally intended to follow
the book's model or not, the truth is it is being used to store party
classification types. If that is the case, then why do we need another entity
that does the same thing?
Yes, PartyClassification would be a join entity. I haven't looked at the impact
on the Party.partyTypeId field - that is certainly worth discussing.
-Adrian
On 3/29/2011 10:58 AM, David E Jones wrote:
Yeah, I think we've been over this before. You're still forgetting that the *Type
entities in OFBiz have NOTHING to do with anywhere the term "type" is used in
the Data Model Resource Book.
Stepping back and allowing that this may not be the case, how would you imagine
this model would look? Are you talking about PartyClassification being a join
entity between Party and PartyType? What about the Party.partyTypeId field?
-David
On Mar 29, 2011, at 11:01 AM, Adrian Crum wrote:
A PartyClassification ties a Party to a PartyType and it includes from and thru
dates (Figure 2.3 and Table 2.3).
If you want to group classifications, then you group PartyType, not
PartyClassification.
-Adrian
On 3/29/2011 9:48 AM, David E Jones wrote:
Could you be more specific?
-David
On Mar 29, 2011, at 10:24 AM, Adrian Crum wrote:
Why can't we use the pattern in the Data Model Resource book? It's simple and
it works.
-Adrian
On 3/26/2011 9:57 AM, David E Jones wrote:
On Mar 22, 2011, at 6:27 AM, Jacopo Cappellato wrote:
- redesign following a more standard approach
PartyClassificationGroup/PartyClassificationType/PartyClassification
Yes, this is another good one. This the pattern I had in mind:
<entity entity-name="PartyClassification"
package-name="mantle.party.party">
<field name="partyClassificationId" type="id" is-pk="true"/>
<field name="classificationTypeEnumId" type="id"/>
<field name="parentClassificationId" type="id"/>
<field name="description" type="text-long"/>
<relationship type="one" title="PartyClassificationType"
related-entity-name="Enumeration">
<key-map field-name="classificationTypeEnumId"/>
</relationship>
<relationship type="one" title="Parent"
related-entity-name="PartyClassification">
<key-map field-name="parentClassificationId"/>
</relationship>
</entity>
<entity entity-name="PartyClassificationAppl"
package-name="mantle.party.party">
<field name="partyId" type="id" is-pk="true"/>
<field name="partyClassificationId" type="id" is-pk="true"/>
<field name="fromDate" type="date-time" is-pk="true"/>
<field name="thruDate" type="date-time"/>
<relationship type="one" related-entity-name="Party"/>
<relationship type="one" related-entity-name="PartyClassification"/>
</entity>