cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Huss <>
Subject Re: Change tracking API in Cayenne
Date Fri, 11 Oct 2019 14:24:36 GMT
I haven't worked with the GraphDiff API much, but it's not super easy to
turn a GraphDiff into something immediately useful.

When I've needed things like this I've usually constructed a
List<Map<String, Object>> with a row for each changed object and a map with
attribute/relationship key to the new value. Looking at
NodePropertyChangeOperation - it has the key and the old and new value, but
the API doesn't have any way of extracting that information that I see.

Most likely I just don't understand how to use this correctly, but I'm
guessing I wouldn't be the only one.

On Fri, Oct 11, 2019 at 5:36 AM Andrus Adamchik <>

> 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
>   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]

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message