Skip to main content
So I have a parent-child relationship, and I have created individual smart objects to represent the parent and child.  Using the Associations wizard, I have associated the parent with the child via a foreign key, and opted to create a 'composite' smart object.  When the wizard completes (successfully), I do not see this composite smart object anywhere.  I'm not sure exactly what I was expecting, I guess I wanted there to be a method from the parent smart object to get its children... but nothing appears to have changed other than the parent's primary key has been added to the child smart object.  Am I misunderstanding what the purpose of 'Associations' are?

Here is a blog entry "Composite SmartObject Basics" containing documents and projects that might help you with the concept of Composite SmartObjects:
http://www.k2underground.com/blogs/fromthebench/archive/2008/02/13/composite-smartobject-basics.aspx


This very recent article details one way that you can leverage SmartObject Associations in your code:
http://www.k2underground.com/blogs/fromthebench/archive/2008/05/06/how-to-generically-iterate-through-associated-smartobjects.aspx


Thank you, Joseph.  There is some interesting stuff in there, but it all seems to deal with one-to-one smart object relationships.  I still don't quite understand parent-child relationships when it comes to smart object associations.  I was hoping that once you make a parent-child association, when you load the parent there would automatically be a property to get to the children (and the data connection, if used in InfoPath, would have a repeating node representing the child objects).  If this is not the point of composite smart objects, let me know so I stop trying to chase it down.  Thanks!

Reply