Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
lists: newObject and ValueChange? #129
I have a problem with changes that are made on objects within a list.
For a consistent presentation I would like to have the information about the NewObject more detailed (like null -> prop1value).
This produces the output
But for the NewObject I have no idea what the values are for the properties (of course here I am only interesed in the properties that are not annotated with @DiffIgnore).
I have to show the changes in a consisten way later in my webapp.
How can I handle that?
then Javers can correctly recognize this element as list of entities and compares as you expect:
You can find more information about Javers Entities and Entitie id in documentation:
If you are interested in comparing lists I also suggest you to read about list compare algorithms:
I hope that documentation will be helpfull :), now I am considering about your first question, write back soon
Thanks for your replies.
In my example the field "id" is not an database id (bad example, sorry), only a number that shall be ignored (I do not have entities, but simple domain objects).
Adjustments in Pet class:
now the code
produces the output:
The last block "removed object" seems not to be correctly:
Hi, sorry, I gave you wrong answer.
You are right that when you are querying for changes, you don't get the initial change connected to
JQL is released in javers 1.2.0
Give us a star if you like JaVers