I ran some quick tests and noticed that in both Hibernate 5.6 and 6.1 we used to create the owner_id foreign key column on both the root table computer_system as well as in the 2 subclasses tables customer_computer_system and distributor_computer_system. However, the actual join column used both when persisting and when retrieving the associated entities is only the one in the root computer_system table, that we’re no longer creating in 6.2.5.Final. I suppose we could get rid of the unused columns in the inheritance classes and restore the correct one on the root table. Also, the assertion error you report doesn’t look related but it should be fixed too. |