I am new to Neo4j and py2neo. I used the GraphObject model like so:
class Capability(GraphObject):
__primarykey__ = "term"
term = Property()
child_of = RelatedTo("Capability")
parent_to = RelatedTo("Capability")
After I create a "Capability":
c = Capability()
c.term = name
graph.push(c)
Querying the database in the Neo4j browser gives me this:
Where the nodes are blank. Furthermore if I change the model to this:
class Capability(GraphObject):
__primarylabel__ = "name"
__primarykey__ = "term"
term = Property()
child_of = RelatedTo("Capability")
parent_to = RelatedTo("Capability")
Where the "primarylabel" I get names in the nodes in Neo4J like expected, but the node is no longer considered a "Capability" - which means I also can't search for "Capability":
... which makes sense since I overrided the primary label, but it seems odd that the only way I can see the label of the Capability in Neo4J is by not having the node be considered a Capability.
So the questions is: in py2neo, how can I create a node that is considered a Capability based on the model as well as have the term label show up in the Neo4J node graph (instead of blank)?