You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SDN will not save relationships annotated with @RelationshipProperties if the start node already exists.
Please see this example app that reproduces the bug.
For example, say you have a schema like this, where two nodes are related and this is represented by a
class annotated with @RelationshipProperties
@Node
public class Cat {
@Relationship("HAS_CLAW") List<HasClaw> claws;
}
@Node
public class Claw {
}
@RelationshipProperties
public class HasClaw {
@Id @GeneratedValue Long id;
boolean dewclaw;
@TargetNode Claw claw;
}
Once you create a Cat, you can no longer add new HAS_CLAWS relationships
Cat cat = new Cat();
cat.getClaws().add(new HasClaw(false, new Claw()));
catRepository.save(cat);
cat.getClaws().add(new HasClaw(true, new Claw()));
catRepository.save(cat);
Cat found = catRepository.findById(cat.getId()).get();
assertThat(found.getClaws()).hasSize(2); // fails: size is 1
Note that relationships not annotated with @RelationshipProperties (for example the Dog entity in the example code)
are not affected by this.
This example worked correctly in SDN 6.3.2, but it fails with SDN 6.3.3.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this bug. Yes, it is definitely a (stupid) bug and I am sorry that you have to encounter it.
For now I can only advise to use 6.3.2 and give the 6.3.4-GH-2599-SNAPSHOT a try (should be available in the next 30 minutes).
SDN will not save relationships annotated with
@RelationshipProperties
if the start node already exists.Please see this example app that reproduces the bug.
For example, say you have a schema like this, where two nodes are related and this is represented by a
class annotated with
@RelationshipProperties
Once you create a
Cat
, you can no longer add newHAS_CLAWS
relationshipsNote that relationships not annotated with
@RelationshipProperties
(for example theDog
entity in the example code)are not affected by this.
This example worked correctly in SDN 6.3.2, but it fails with SDN 6.3.3.
The text was updated successfully, but these errors were encountered: