|
Hi, I may have a solution. Please look at https://github.com/hibernate/hibernate-orm/pull/615 .
I found out, that in the method JoinedSubclassEntityPersister.determineTableNumberForColumn, hibernate goes only though the "normal" (not identifiers) columns, when searching for a table the column belongs. So I added compassion with identifier keys and return table 0 (is this the root table?).
I also found out, that annotating collection with @OrderBy without specifying attribute does nothing. According to http://docs.oracle.com/javaee/6/api/javax/persistence/OrderBy.html, it should order by primary key. This is regression since 4.1.5. I remove one check in CollectionBinder and it works again.
So I added two unit tests. Both are using composite key in the associated entity, to better test the functionality.
Cheers, Matus
|