This is the way it used to work if you mapped with XML. Sometime after 4.3.11 that changed. As a workaround you can take the code from org.hibernate.type.AnyType and modify it so that it does what you want. That's what we are doing as part of an upgrade to hibernate 5.2. |