SDN uses a Long field for the node-id so a null value there means that the entity has not yet been persisted.
You cannot control Neo4j's internal node-ids. If you want to have controllable id's you have to use your own business primary-keys. Make sure to index them or add a constraint for quick lookup and uniqueness. Michael Am 03.09.2014 um 21:06 schrieb Aman Gupta <aman.a.gupta1...@gmail.com>: > Hello Everyone, > > I am designing an application with several Domain/ entity classes with Jersey > and Spring integration. Thing is, during initial time, or say first > execution, each node which is saved in neo4j database, has an nodeId 0. Its a > point of my interest. How can we make it sure that each nodeId should be > atleast greater than 0 ? > > Why I need this ? > > I need this because I think, it would help me while validating request, > received from front end. Consider a scenario of Updating a node which hold > nodeId value as 0. Now what would be the best approach to check if nodeId is > correct or not ? Indeed I can make call to db and be done with it, but I dont > want that. I saw in case of Spring Data JPA, where we have @GeneratedValue > from J2EE, which atleast provide some sort of control to generate Id of our > choice. but I didn't or say I am yet not able to find any such provision if > made. > > Is there any thing which I am missing confrontational points ? FYI I have > Spring Data Neo4j latest stable release and Neo4j 2.1.3 server. > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.