I have been having a problem pushing read-only associations to
clients when then are part of a nested collection of a managed
object. It seems as if there is only one way to do this, but I want
to confirm this with others to make sure I am not missing something.
myObject
contains myObject.myCollection which is the non-owning side of a
bidirectional one-to-many association.
THIS WORKS
if I add the new object to the collection ->
myObject.myCollection.addItem(newObject)
then commit that collection, the changes get pushed to all clients
THIS DOESN'T WORK
if I use createItem(newObject) to persist the object
then call myObject.myCollection.addItem(newObject) to add the new
object to the collection
in this case the object persists to the database and the local
collection is updated, but no changes get pushed.
QUESTIONS
1) Is this the expected behavior? (I am using LiveCycle Data
Services: 2.6.0.200182)
2) I seem to recall if the collection is the result of a client
called fill operation then createItem will push to new object to the
filled collections. Is this true?
3) Is it best practice (or perhaps the only practice) when working
with read-only properties to always use the (non-owning) collection
to persist the objects rather than call a createItem assuming you
want the data to push out to other clients?
Thanks for the clarification.
- Kevin