Hi, I'm using neomodel's OGM and have a few questions.
- Is it recommended for production usage?
- Would you pick it over py2neo's OGM?
- My model requires multi inheritence.
class C(A, B):
__abstract__ = True
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?
Neomodel does not provide the
__abstract__ property, but
So: in your case:
__abstract_node__ = True
I hope it helps..
I've been using it in production for approaching 4 years and five projects so its certainly stable.
I picked it over Py2Neo as it works closer to how I code and closer to Django which I have used for those projects.
It does support multiple inheritance but beware that it will create nodes with multiple labels in the case of the example that you have given.
Oh, It awsomw to read about using django and neo4j. Im starting to integrate both but Im stuck by creating new nodes. Are you using neomodel? and if yes, are you using django-neomodel also? My dubt is that this last library seems to be outdated and I dont know how to solve this error
NodeMeta' object is not iterable
hope you can help me a bit. Thank you!!