views:

50

answers:

1

We're using LCDS and the "commitRequiredOn" method in the DataService class to check if there are pending changes for an entity. However, it seems like "commitRequiredOn" does not check the complete graph of an object, but just the object itself. For now, we have implemented a recursive check on the complete object graph, but this seems like functionality that should come out of the box.

Am I missing something here, or is there just no built-in way to recursively check an entity to see if it's dirty or not?

A: 

I can confirm that commitRequiredOn is checking only the objects itself. But there is also the property DataService.commitRequired (and this is checking for all the objects managed by the dataservice) - maybe you can use it.

Cornel Creanga
Thanks for the answer. I know of the commitRequired method, but we want to check on a lower level what objects need updates. Can you share your ideas/approach to checking complex objects, or are you not in need of such functionality? The problem with the recursive check we have is that as soon as you touch a property, it gets loaded.
Christophe Herreman