In a polymorphic relation with an entity hierarchy using SINGLE_TABLE inheritance type, the properties of subclasses (which do not exist in the parent class) are not loaded if the query to retrieve the required objects acts on a parent class. It looks like the selector, created by Hibernate OGM for MongoDB extension, considers properties of a base class only. This works without any issue with any JPA provider for RDBMS databases.
You can find a fully working example in https://github.com/dadrus/jpa-unit to reproduce this issue. The affected test case is in https://github.com/dadrus/jpa-unit/blob/master/integration-test/base/src/main/java/eu/drus/jpa/unit/test/AbstractApplyCustomScripsTest.java (test1() method; line 70) With Hibernate OGM and MongoDB it can be run using https://github.com/dadrus/jpa-unit/blob/master/integration-test/jpa-mongodb-hibernate-ogm-test/src/test/java/eu/drus/jpa/unit/test/ApplyCustomScripsTest.java. The aforementioned line is disabled because of this issue. If enabled NPE is thrown with Hibernate OGM and MongoDB.
If you run the same test but for a RDBMS (e.g. from https://github.com/dadrus/jpa-unit/blob/master/integration-test/jpa2.1-hibernate-test/src/test/java/eu/drus/jpa/unit/test/ApplyCustomScripsTest.java) everything is fine.