on 10-30-2008 7:19 PM
Hi,
I have a record in the main table that is the child in a parent/child relationship to another main table record. Using the Java API, how would I obtain the parent record in the relationship where I am starting with the child record? In the API there seems to just be calls for getChildren, but not a getParent type call.
Appreciate any immediate help that can be provided.
Thanks,
Eddie
Hi Eddie,
Please follow the below steps to retrieve only parents of a child Record.
1. Create RetrieveRelationshipsCommand.
2. Set the parameter RelationshipId.
3. Set the parameter Anchor Record and Anchor Record Id. In this case the child record for which parents records to be retrieved.
4. Set the parameter setGetChildren as false . This retrieves only the parent records for the specified child reocrd.
5. Execute the RetrieveRelationshipsCommand.
6. Retrieve member records from above step.
Hope it helps
Regards,
Neeharika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If the Child node is present in
HierNode taxonomyHierTreeRoot;
then use the command
taxonomyHierTreeRoot.getParent(); -- to retrieve the parent node.
Thanks,
Priya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.