Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-06-2022 01:08 AM
Given the following code I would expect every node which is created in the database to receive a property CreatedAt.
At the moment some nodes get the CreatedAt property, but others do not.
@Override
public Void beforeCommit(TransactionData data, Transaction transaction, GraphDatabaseService databaseService) throws Exception {
data.createdNodes().forEach(node -> {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ");
node.setProperty("CreatedAt", ZonedDateTime.now().format(formatter).toString());
});
return null;
}
It seems that sometimes nodes do not get the CreatedAt property, but other times they do.
Am I missing something here?
(Sorry if this is a really vague question, but I can't figure out a possible cause)
All the sessions of the conference are now available online