I assume that you are using assigned identifiers(?). In this case SDN cannot distinguish between new or existing entity because the identifier controls the isNew detection.
Here is the simple example I am playing around with:
@Node
public class Movie {
@Id @GeneratedValue private long id;
@Version private Long version;
@CreatedDate private LocalDateTime created;
@LastModifiedDate private LocalDateTime modified;
private String title;
private String tagline;
private Integer released;
...
modified is set correctly on each change, created is never set.
What has to be done to make this work?
In the past I had an OGM EventListenerAdapter that would set created and modified for me but I thought I would give this built in feature a try. Oh BTW is there a doc/example somewhere how to implement something like an "onPreSave" in the new SDN 6?
Short answer: Use a Long instead of the primitive long as the type for you id.
Longer answer: Due to the fact that Neo4j now handles also 0 as a valid identifier value, SDN cannot determine if the node is new or not. As a result it returns false for the new check because the primitive long is 0.