I have old .hbm.xml files with a map defined <map name="traductions" sort="natural" >. The POJO has a SortedMap. It works great with Hibernate 4.3.10.Final.
When I migrate to Hibernate 5.1.0.Final, it doesn't work anymore. I trace the problem in PluralAttributeSourceMapImpl that doesn't implements org.hibernate.boot.model.source.spi.Sortable. The only class that implements Sortable is PluralAttributeSourceSetImpl. So I guess SortedSet are managed, but not SortedMap.
Here is a test for HHH-10774. There is the same test in both test-case-template-hibernate-orm4 and test-case-template-hibernate-orm5 with a SortedMap. It works on hibernate4. It doesn't on hibernate5 without the PluralAttributeSourceMapImpl patch.
I just add the test case as a zip.
Silly error on my part
I am missing how the attached test illustrates the problem though.
> I am missing how the attached test illustrates the problem though.
If you remove the PluralAttributeSourceSetImpl file in the Hibernate 5 version, the test should fail. But the same code work with Hibernate 4.