-
Notifications
You must be signed in to change notification settings - Fork 617
saveAll
use the lowest common denominator for determining the entity type to be saved.
#2326
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
I assume you mean |
Anyway, I can confirm this, |
saveAll
methods use the lowest common denominator for determining the entity type to be saved.
saveAll
methods use the lowest common denominator for determining the entity type to be saved.saveAll
use the lowest common denominator for determining the entity type to be saved.
michael-simons
added a commit
that referenced
this issue
Jul 14, 2021
collection is persisted. In case a heterogeneous is persisted via `saveAll` on a repository or any of the templates, we do fall back to individual statements to persist its content the same way we handle dynamic labels, versioned entities or entities with generated ids. The reason for this is simple: We need the exact entity to determine labels in an inheritance hierachy, otherwise only the information given by the lowest common denominator will be considered, effectively leading to `saveAll` behaving different than `save`. This fixes #2326.
michael-simons
added a commit
that referenced
this issue
Jul 14, 2021
collection is persisted. In case a heterogeneous is persisted via `saveAll` on a repository or any of the templates, we do fall back to individual statements to persist its content the same way we handle dynamic labels, versioned entities or entities with generated ids. The reason for this is simple: We need the exact entity to determine labels in an inheritance hierachy, otherwise only the information given by the lowest common denominator will be considered, effectively leading to `saveAll` behaving different than `save`. This fixes #2326.
Thanks for reporting this. This is fixed and will be released this week. |
You are right about the annotation. I updated the original post from |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given a list of entities with mixed types which have common parent.
e.g.,
Base class does NOT have
@Node
annotationEntity classes have
@Node
annotationRepository class
List of animals
Save iteratively
Two nodes created with all labels (Animal, Pet, Cat, Dog) correctly as expected
Save the list with saveAll does not save correctly.
Two nodes are created but these nodes only have a label of
BaseEntity
.Expected behavior
The saveAll() method with mixed entity type should create exact same labels as save().
version 6.1.1
The text was updated successfully, but these errors were encountered: