-
-
Notifications
You must be signed in to change notification settings - Fork 368
Problem deserializing EmbeddedId after reastart #897
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
Comments
@tkuprevich there is a lot of noise in your test. I did the cleanup here: In the first read, in In the second read, in |
This is a documentation issue and not a bug in javers :) In 5.8.4 I have added the warning when
|
It's worth to mention that classes annotated with |
@tomekstankowski feel free to contribute a PR that would add this info |
We have an entity having
@OneToMany
relation to another entity having composite key mapped as@EmbeddedId
.Many side:
And also we have registered
TypeAdapter
forEmbeddedId
:We read snapshots using id and
typeName
for parent entity;And everything is read correctly until we restart the server. After that the collection of embedded ids comes row (doesn't get deserialized). And
managedType
referencesjava.lang.Object
asbaseJavaClass
instead of expectedAgreement
user class in downloaded snapshots.If we create a query like
QueryBuilder.byInstanceId(agreement.agreementId, Agreement.class)
everything works correctly before and after restart.Please see the test case demonstrating the problem: #896
And related stackoverflow discussion: https://stackoverflow.com/questions/58269576/javers-is-it-possible-to-get-cdosnapshotserialized-instance
The text was updated successfully, but these errors were encountered: