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
How to handle removed entity field? #723
Comments
hi, are you using the latest version? |
@bartoszwalacik we are using 3.11.5 but I will double check the latest one tomorrow.. Not sure if it will change anything though. |
looks like loading snapshots for removed classes is not supported. Think about contributing a PR to solve this problem. It shouldn't be hard. I can give you some hints |
@bartoszwalacik Sure I am willing to contribute. Please give some hints and I will do it when it's possible. Let's frame a bit the expected behaviour if it's possible. So we should just ignore the removed fields in this case? but should we display removed ones in the changes? |
@chengchen I have created the failing test case with issue reproduction |
…the removed embedded entities
connected with |
@bartoszwalacik I tested my patch (workaround), at least it's working for our use cases. I am able to retrieve "removed" entity snapshots and even other entities contains "removed" entity. |
to be released in 3.11.7 |
released in 3.11.7 |
Hello,
I am sorry if this question is already asked, and I did search before asking, the most relevant one I found is: #511
We are using javers to do audits in our company, and we are satisfied with it's simplicity. However, we had an issue recently regarding a simple removal of a field in an Hibernate entity. And this field itself is an entity as well. So to simplify a bit: Product entity had a field called Category, but Category has been removed completely from db as well as from the code. If I don't do any change in the javers tables, it will break simply with the exception:
I am wondering how should we proceed in this case without cleaning up massive amount of json snapshots? I also quickly browsed in the javers source code, I could not find a place to configure ignoring removed fields..
Could you help us with some hints? Or do you need some examples to reproduce?
Many thanks!
Chengchen
The text was updated successfully, but these errors were encountered: