-
Notifications
You must be signed in to change notification settings - Fork 617
Closed
Description
SDN 6.2.4 is unable to instantiate nodes with multiple levels of inheritance and a non-empty @DynamicLabels
field.
I have an example repo but here is a summary of the problem.
For example, say you have a super class
@Getter
@Node
public abstract class Animal {
@DynamicLabels
private Set<String> labels = new TreeSet<>();
}
A sub class
@Node
public abstract class Feline extends Animal {
}
And a sub class of the sub class
@Node
public class Cat extends Feline {
}
You can query for instances of the Cat
sub class only if they do not have a dynamic label
Cat cat1 = new Cat();
animalRepository.save(cat1);
Cat cat2 = new Cat();
cat2.getLabels().add("Orange");
animalRepository.save(cat2);
Cat found1 = (Cat) animalRepository.findById(cat1.getId()).get(); // this is fine
Cat found2 = (Cat) animalRepository.findById(cat2.getId()).get(); // BeanInstantiationException
The second query fails if the Feline
sub class is abstract or concrete, though the exception is different.
This example worked correctly in SDN 6.2.1 but it fails with SDN 6.2.4.
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug