Just adding an item to a managed collection will implicitly queue up a "create" for the child item. If you call "createItem" it also adds a new client reference just for that specific item. So usually you want to avoid calling createItem unless that item lives all by itself.
Jeff From: [email protected] [mailto:[email protected]] On Behalf Of Besite - Bart Sent: Monday, January 26, 2009 3:16 AM To: [email protected] Subject: [flexcoders] LCDS : Managed associations - creating new Items Hello, Another Livecycle question.. I have a managed collection of Companies. Eeach company contains a list of employees. The Company-object and Employee-object are Managed objects, tagged with the [Managed] metadata tag. They each have an associated destination on the server (configured in the data-management-config.xml). There exists a one-to-many managed association between these two objects. When I add a new Employee to the managed arraycollection "companies" like this : Employee newEmployee = new Employee("John Smith", "Engineer"); companies.addItem(newEployee); companyDS.commit(); Should this result in a createItem() in the EmployeeAssembler ? Or should I explicitly call employeeDS.createItem(newEployee); ? Thanks for your help.. Bart
<<inline: image001.jpg>>
<<inline: image002.jpg>>

