Open shaojiajun314 opened 3 years ago
how to get a instance with Increment id
To retrieve a node with an specific property see: https://neomodel.readthedocs.io/en/latest/getting_started.html#retrieving-nodes. As an example:
jim = Person.nodes.get(name='Jim')
For indexing you can use UniqueIdProperty()
https://neomodel.readthedocs.io/en/latest/module_documentation.html#neomodel.properties.UniqueIdProperty
as shown here
thanks. and i wanna ask another question. the id could be reuse, Is it the reason for the orm you coded, does not provided the api that i want?
@shaojiajun314 yes - for example if a node is deleted there could be a future node with the same internal id. This is why it is recommended for you to make your own domain-specific id field.
How to do, i want to get a record with id, like cql "WHERE ID(n)=number"