Change tracking API in Cayenne

Andrus Adamchik <[email protected]>
Newsgroups gmane.comp.java.cayenne.devel
Message-ID <[email protected]>
Was just answering Cayenne change tracking question on StackOverlow [1], and realized that the only user-friendly API that allows to check for individual changes is "cayenne-commitlog" that only works during commit. All the pre-commit APIs are internal and require lots of hoop jumping. I think we can address that on the cheap in 4.2 by defining a method like this in GraphManager.java:

  GraphDiff getChanges();

We already have such method implemented in ObjectStore, so there's really no effort and an immediate benefit. Or take it a step further and additionally implement filtering changes per object:

  GraphDiff getChanges(Persistent)

Thoughts?

Andrus

[1] https://stackoverflow.com/questions/58318730/what-is-the-current-best-method-of-getting-the-changes-to-an-object-hierarchy-in
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.