At the moment if you use an inheritance structure within your entity classes the nodes are not created correctly from my point of view.
If I model a structure like this...
... Hibernate-Ogm generates a Node with the Labels ENTITY and PERSON. Furthermore it gets the properties Id, Name and DTYPE. The DTYPE is then the name of the concrete subclass.
From my point of view I would expect a Node with the Labels ENTITY, PERSON and PLAYER or ENTITY and PLAYER. I'm note absolutly sure what's the correct solution here but it feels strange not to be able to query my node like this:
Instead I have to write it like this...
...which feels strange.
Thanks , that's a good point
I think it make sense to have multiple labels in this case:
You should be able to execute both queries:
For your use case, if it is enough to have the node mapped as ENTITY and PLAYER you can use the annotation @Inheritance(strategy=TABLE_PER_CLASS)