OGM using python's neomodel

neo4j-driver

(Mizrahi Itamar) #1

Hi, I'm using neomodel's OGM and have a few questions.

  1. Is it recommended for production usage?
  2. Would you pick it over py2neo's OGM?
  3. My model requires multi inheritence.
    e.g.
class A(StructuredNode):
	pass

class B(StructuredNode):
	pass

class C(A, B):
	__abstract__ = True
	pass

Node of type C is a representation of nodes defined with both labels A and B, and abstract is used to specify that C is not an actual label in the graph.
However, when I try to use C.nodes.all() - it will try to query nodes with label C (which does not exist). I may specify label, but I can only assign one label (either A or B). Specifying label = "A:B" will also fail, because it builds the query as follows: "MATCH (a:b:A:B) ..."
How would you achieve correct matching when using label such as C? or is there a better way to achieve it?

Thanks