New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lists: newObject and ValueChange? #129
Comments
Hi For the second question:
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 |
For now short answer is to use:
but i think there is not exacly what you expect, im going to think about it tomorrow :) |
Gents, there is the flag, which does exactly that job @AzraelCole could you confirm if it solves your issue? |
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: |
Could you please distill this issue as a small project with a failing test and push it to |
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 |
think I will add this feature (lets call it 'initial value at change history') in v 1.2 |
will be solved in 1.2 |
JQL is released in javers 1.2.0 Give us a star if you like JaVers |
if you are using SQL DB, there is a schema migration script |
Hi,
I have a problem with changes that are made on objects within a list.
Assumption: There is an object with a list of other objects. Then an element of the list is removed and later two new elements are added.
Now a ValueChange is fired and a NewObject.
The ValueChange gives me the differences (prop1value -> prop2value), but the NewObject only says "hello, I am new".
For a consistent presentation I would like to have the information about the NewObject more detailed (like null -> prop1value).
Here is a small example:
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?
Or would it be possible to detect that "cat" is removed (-> ObjectRemoved) and "dog" and "mouse" are added (-> NewObject)?
Thanks!
The text was updated successfully, but these errors were encountered: