I user spring-boot-starter-data-neo4j version 2.4.5
I think it has something to do with the following warning:
Instances of class de.fh.kiel.advancedjava.pojomodel.model.Pojo with an assigned id will always be treated as new without version property!
which always pops up if I try to save anything.
My node:
@Node
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class Pojo {
private boolean emptyHull;
@Id
private String completePath;
private String className;
private Package aPackage;
@Relationship(type = "attributes")
private Set<Attribute> attributes;
@Relationship(type = "parent")
private Pojo parentClass;
@Relationship(type = "interfaces")
private Set<String> interfaces;
}
If try to update the node like this:
var pojo = pojoRepository.findById(id);
changeAttributesOfPojo(pojo);
pojoRepository.save(pojo)
it does not update the node.
My ids look like this: de.fh.kiel.advancedjava.pojomodel.exampleData.DefaultClass
They are names names but each name is unique.
I tried to add a version property like this:
@Version
private Long version;
My Application did not work after that. I guess I need to add it differently or need to change my constructurs for that to work. But is the verison property even the problem?