Closed iamliamc closed 3 years ago
You can use matching on a model as well: https://py2neo.org/2021.0/ogm/index.html#object-matching
Very cool thanks for... knowing the docs:
Register.match(self.graph).where(point_id=point_id).first()
<Register uuid='76c46a70-6768-47dc-87b4-ac6f7860f227'>
self.graph.nodes.match("Register", point_id=point_id).first()
Node('Outside Air Temperature Low Reset Setpoint', 'Register', brick_class='Outside Air Temperature Low Reset Setpoint', point_id='KRSD8ADM.Air Distribution.AHU.OAT X1', uuid='76c46a70-6768-47dc-87b4-ac6f7860f227')
Here is my Model:
This gives me the behavior that I want only I want it with a property other than the primary key: https://py2neo.org/2021.0/ogm/index.html?highlight=get#py2neo.ogm.Repository.get
Is there anyway to query the non-primary key and get the Register not the Node back?
I guess perhaps this is a bit of a push back on if i'm using the right primary key... but I do think I need both...