A native query in Neo4jRemote returns the discrimnator type value as a Long instead of an Integer.
Because of this the equality doesn't work and the OgmLoader cannot find the sub class corresponding to the discriminator value.
This causes a NullPointerException.
Hibernate OGM 4.5.1, Wildfly 14.0.1, Zulu 8, Windows 10, Neo4j 3.5.1
Do you know why the data left behind would interfere with the test the second time, since it's just a simple select query?
I have tried this using Hibernate ORM and it works fine, all the queries return the correct data.
No, it shouldn't cause any problem.
There are some issues when it tries to load the entity due to the inheritance. But I still not sure what the problem is.
I'm pretty sure that's an OGM bug.
The only problem I've found in the test you provided is that you don't close the factory at the end.
I figure out the problem. I wil lsend a PR soon.
In the meanwhile, JPQL queries will work fine, for example:
@Davide D'Alto, I tried the JPQL queries and they also had the same issue.
OK, sorry about that. I will double check. Maybe I tested with the patch applied