Unable to disable auto-increment node ID in Neo4j. In fact, the Ids generated automatically by Neo4j are of internal use of the database. These Ids are even reused by the database when a node or relationship is deleted, as you can see at this link. This way, we cannot "trust" or depend on this ID.
Nothing prevents you from creating your own ID property and using this ID to do your queries / updates from us. For example, when running CREATE (:User {id:1})
you are creating a node with a label :User
and a property id igual
to 1. This ID has nothing to do with the internal ID managed by Neo4j, so much so that to access it in a WHERE
just do WHERE node.id = 1
, while to use the internal Neo4j ID you would need to use the function ID (WHERE ID(node) = 1
).
Thank you very much, helped a lot, I did the recommended one, I created an attribute that references the ID of the relational bank, and this working.
– Andre Soares
Cool, @Andresoares! Please, if this answer has solved your problem remember accept it to inform other users that your issue has been resolved and help future viewers of your issue. Thank you! :)
– Bruno Peres