neo4j - Implementing NodeEntity base class, implications of the Labels -
i have next kind of base of operations class every inherited node classes.
@nodeentity public abstract class nodeentitybase { // id not used advanced mapping spring-data-neo4j. @graphid protected long id; @indexed(unique = true) @notnull protected string appid; ....
but if implement that, spring-data-neo4j create nodeentitybase label every node. don't utilize label , worried whether become performance issue later (or other issues). know there limit 2 billions (int max) entries in label index, may become problem, reason prepare this.
is there workaround or design accomplish this? much have base of operations class(es) can set properties (like timestamp created, etc) every node inherits. know utilize interfaces (i have not tested yet if interface labeled), happier don't need set setters/getters every inherited class.
will there performance decrease when there millions of nodes? , repeat won't utilize label queries. 2 billion limit may big enough, forget this.
you seek set @nodeentity on concrete classes.
alternatively utilize implementation of typerepresentationstrategy writes single label,
like this
https://gist.github.com/jexp/8b495cf6c6e81cc2a1c9
neo4j spring-data-neo4j
No comments:
Post a Comment