There was a question on "how to add labels dynamically to nodes in Neo4j". Is there a way to dynamically change the entity types?
Take an example:
@NodeEntity
public class User {
@Properties(prefix = "custom")
private Map userProperties;
}
I see from https://neo4j.com/blog/spring-data-neo4j-5-0-release/ that I can create dynamic properties. Can I have dynamic types during run-time as well? I want to change "User" type to "Consumer"/"Admin"/"Producer" dynamically when needed. The entity types are non-exhaustive.
Thanks in advance! :)
There is an
@Labelsannotation on aSet<String>that is stored/managed in addition to the main type from the class and interfaces.see: https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#reference:annotating-entities:node-entity:runtime-managed-labels