gloeglm wrote:
Feel free to attatch a patch, Gavin will surely detect if it breaks anything :)
First question
I spotted two places in the code where UserTypes are created:
- in Hibernate.custom()
- in TypeFactory.heuristicType()
The TypeFactory already makes reference to Hibernate.* methods where the singleton for native types are defined.
My question now is where should I create the pool of UserType instances ?
According to the names, I would do it in the TypeFactory. But doing so will introduce circular dependencies between Hibernate and TypeFactory...
It seems the best place is therefore in Hibernate (class) itself.
Any opinion ?
Second question
The
PersistentEnum(s) suffer from the same 'problem'.
Wondering if we could pool them as well ?
Are there any other types like those ?