Great answer!
When adding a customer (Party) it needs to have a Classification
associated with it to carry the SIC code of the Party.
My reverse engineering of the Party entities and the seed data led me to
the following fragment that will load a CUSTOMER and the SIC
classification of"13"
<Party partyId="FOUR SEASONS HOTEL" partyTypeId="CORPORATION"
preferredCurrencyUomId="USD" partyStatus="PARTY_ENABLED"
externalId="100012"/>
<PartyRole partyId="FOUR SEASONS HOTEL" roleTypeId="CUSTOMER"/>
<PartyClassification partyId="FOUR SEASONS HOTEL"
partyClassificationTypeId="SIC_CODE" partyClassificationGroupId="13"/>
<PartyClassificationGroup partyClassificationTypeId="SIC_CODE"
GroupId="13" description="Miscellaneous"/>
From your description I will have no trouble loading another CUSTOMER
that is also a hotel (SIC Code 13) again
<Party partyId="HILTON" partyTypeId="CORPORATION"
preferredCurrencyUomId="USD" partyStatus="PARTY_ENABLED"
externalId="100012"/>
<PartyRole partyId="HILTON" roleTypeId="CUSTOMER"/>
<PartyClassification partyId="HILTON"
partyClassificationTypeId="SIC_CODE" partyClassificationGroupId="13"/>
<PartyClassificationGroup partyClassificationTypeId="SIC_CODE"
GroupId="13" description="Miscellaneous"/>
The statement <PartyClassificationGroup
partyClassificationTypeId="SIC_CODE" GroupId="13"
description="Miscellaneous"/> will be processed many times but only
result in a single PartyClassificationGroup entity with SIC_CODE 13
which is the desired result.
Ron
On 23/01/2015 11:37 AM, Ruth Hoffman wrote:
Hi Ron:
In general - and please feel free to add to the Wiki: If the utilities
that load seed data into the database encounter a record (to be
loaded) where the primary-key(s) for this record already exist within
a record in the database, only the non-primary-key data is loaded.
Specifically, you can never replace a primary-key(s) for an existing
record in the database. This is intentional and done to preserve data
integrity.
On the other hand, if a record with the identical primary-key(s) do
not exist (the entire combination of primary-key(s) is considered),
then a new record is written to the database.
Given that, what entity are you loading with SIC codes? You will first
need to determine which entity this is in order to answer your
question from below: "what happens if the entity engine detects
multiple requests to load the same classification id" ?
Hope this helps.
Best Regards,
Ruth Hoffman
http://www.aesolves.com
On 1/23/15 11:13 AM, Ron Wheeler wrote:
I notice that SIC Codes are listed as a "supported" classification in
the seed data.
http://www.ehso.com/siccodes.php
Are there any seed data files that load the actual SIC Codes.
In North America the old SIC is replaced by NAICS except for some US
gov't departments and agencies related to financial regulation
http://www23.statcan.gc.ca/imdb/p3VD.pl?Function=getVD&TVD=118464
http://en.wikipedia.org/wiki/Standard_Industrial_Classification has
links to a number of other industry code systems.
Is there a set of seed data floating about that could be added to the
seed data.
If not, what happens if the entity engine detects multiple requests
to load the same classification id ?
This would happen if the sic code classification was loaded with each
customer or supplier in a bulk load operation of customers or suppliers.
Ron
--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102