Mapping jsonb of different types in a class inheritance hierarchy does not work.
Description
Upon upgrading to version 6 of Hibernate, the following code stopped working. It implements a "single table" hierarchy, with EntityA and EntityB classes inheriting from CommonEntity. These classes have properties of different types - PropertyTypeA and PropertyTypeB - which are mapped to columns in the database with a jsonb type.
Hibernate version 6.1.5.Final
When selecting an EntityB object from the database, an exception is thrown:
Upon upgrading to version 6 of Hibernate, the following code stopped working. It implements a "single table" hierarchy, with EntityA and EntityB classes inheriting from CommonEntity. These classes have properties of different types - PropertyTypeA and PropertyTypeB - which are mapped to columns in the database with a jsonb type.
Hibernate version 6.1.5.Final
When selecting an EntityB object from the database, an exception is thrown: