Can any one explain on procedure to create a new MDMContainment relation ?I tried but couldn't achieve,as it was Not showing any thing in the Property 'Derived from' drop down List in MDMxmi!!
Pinned topic Procedure to create MDMContainment relations in MDM Entity
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-06-15T08:46:12Z at 2012-06-15T08:46:12Z by Pavan_Tondapu
SystemAdmin 110000D4XK938 Posts
Re: Procedure to create MDMContainment relations in MDM Entity2012-06-14T13:22:33ZThis is the accepted answer. This is the accepted answer.Hi,
In v10, we added a wizard for containment creation to make it simpler ... these steps apply to previous versions:
A containment is where a BObj contains a nested child BObj in XML requests and responses, for example: TCRMPersonBObj has the child object TCRMPersonNameBObj. As well as the nesting in the XML, there is also a relationship between the database tables and the add/update/get transactions for the parent object handle adds,updates and queries for the child objects.
1. Right-click the parent entity, New - Containment
2. Give the Containment a name
3. Select the contained entity - can be an out-of-the-box entity, data addition, or transient data object
4. Set the 'Many' flag if you want multiple child objects for a given parent.
5. Set 'Derived from' reference - this is the reference (foreign key) field which is used to connect together the database tables. You don't have to set this - if you don't then the generated code won't manage the parent/child relationships for you, but you can customize the code to do this yourself.
6. Set the 'Inquiry' transaction - this is an inquiry transaction which is used to get the child object(s) for a given parent. You don't have to set this - if you don't then the generated code won't manage the parent/child relationships for you, but you can customize the code to do this yourself.
If the contained entity is an out-of-the-box entity, and Many is true - you won't have a Derived from and Inquiry transaction, and you'll have to write the code to manage the parent/child add, update and get logic.
If the contained entity is a data addition, then you can define on it a suitable reference and inquiry transaction if needed. If Many is true, define a Reference on the child entity which refers to the parent entity - that's the Derived From. Define a GetRecord transaction which queries the child entity by the parent reference field, that's the Inquiry transaction.
If Many is false, then you can either have a reference field on the child entity (referring to the parent) or on the parent entity (referring to the child). If the latter, you don't need to define a special Inquiry transaction, because the standard get by primary key can be used.
If the contained entity is a transient data object, then the Derived from and Inquiry settings won't be used - you again need to customize the code to do whatever logic you want to handle the child objects.
Hope that helps, Catherine.