I was migrating from hibernate-core 4.3.11 to 5.1.0
I had this Hibernate XML mapping:
After I started jetty, hibernate started to validate my schema and throws an exception:
I was curious why it was expecting SQLType 4 (Integer) instead of SQLType 12 (Varchar). On version 4.3.11 it works perfect.
I checked out hibernate-core 5.1.0 sources and found source of problem:
My mapping passed here with 2 parameters (enumClass and type).
Code handled it correct, it found that parameters contains 'type', but the problem is
that after both if statements it returns OrdinalEnumValueMapper.
Which is for if statement: isCharacterType( type ) incorrect. Should be NamedEnumValueMapper, (look at containsKey( NAMED ) handler, it works good).
Linux Mint 17.3