I'm working with the interface py2neo to access the neo4j database out of python. I want to used the autogenerated Id column in an OGM model as a property. But my idea doesn't work. Please look a the example:
from py2neo import Graph, Node, Relationship
from py2neo.ogm import GraphObject, Property, RelatedTo, RelatedFrom
class Material(GraphObject):
id = Property()
name = Property()
description = Property()
I insert the values into the system:
mat_f01 = Node('Material', name='F01', description='Fert Product 01')
mat_f02 = Node('Material', name='F02', description='Fert Product 02')
In the neo4j browser the record are displayed as followed - with the id column:
<id>:178 description: Fert Product 02 name: F02
If I look to the same records in flask the Id column contains the value None. It should contain 177 and 178.
description id name
Fert Product 01 Fert None F01
Fert Product 03 Fert None F03
Many thanks in advance.