I have two neo4j-OGM node entities connected with property-less relationship like so:
@NodeEntity
public class User {
@Relationship(type = RelationshipNames.USER_DEVICES, direction = Relationship.UNDIRECTED)
private Set<Device> devices;
}
@NodeEntity
public class Device {
@Relationship(type = RelationshipNames.USER_DEVICES, direction = Relationship.UNDIRECTED)
private User user;
}
When I add a device to a user and then perform save, i get this graph:
Later on, when i both remove the device from user device set and save it, and set device user to null and save it, I still have the same graph, meaning the relationship between the device and user still exist.
I'm i doing something wrong? Is there a way to delete it?