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
EntityDefinition ignored when it's a shallow reference #1327
Labels
Comments
cberes
added a commit
to cberes/javers
that referenced
this issue
Oct 9, 2023
@cberes thanks for a good bug report |
bartoszwalacik
pushed a commit
that referenced
this issue
Nov 10, 2023
bartoszwalacik
added
fixed - waiting to be released
fixed
and removed
fixed - waiting to be released
labels
Nov 10, 2023
Fixed in 7.3.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using EntityDefinitionBuilder.withShallowProperties, registering an EntityDefinition can cause subsequent EntityDefinitions to be ignored.
For example, say I have 2 classes, where one class has a shallow reference to the other.
and I register the classes in this order
The entity definition for ValueObjectHolder will be ignored. Any type name or properties I set for ValueObjectHolder will not be used.
It seems to be related to the shallow reference in EntityHolder. If I omit the call to withShallowProperties, the entity definitions are registered as expected.
Steps To Reproduce
I have a PR with a failing test. The tests are in org/javers/core/JaversDiffE2ETest.groovy. There are 2 tests:
should use entity definition for entity that is not a shallow reference
passes; does not use withShallowPropertiesshould use entity definition for entity that is a shallow reference
fails; same as above but it uses withShallowPropertiesJavers' Version
7.3.2+
The text was updated successfully, but these errors were encountered: