Basically there are 3 ways Hibernate can understand how to map enums to database values:
If annotations are used, we can look at the EnumType specified @Enumerated
Through explicit user configuration on the type (attribute) mapping
Through guessing by looking at the JDBC type information.
If you are using annotations, I set it up to always look to EnumType defaulting to {{EnumType#ORDINAL}) per JPA spec.
As for PostregSQL enums, the answer there is yes and no. It will work in terms of reading and writing in the same way the patch did; it will simply call getInt/getString and let the lovely pgsql JDBC driver do any conversion it can. If you mean in terms of guessing how the enum value mapping should work based on JDBC metadata, no, thats (hopefully) obviously not possible. Also, be aware that it is also not possible to effectively use schema export creating these PostgreSQL enums.
I'll be pushing this work in a few, please try it.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Basically there are 3 ways Hibernate can understand how to map enums to database values:
If you are using annotations, I set it up to always look to EnumType defaulting to {{EnumType#ORDINAL}) per JPA spec.
As for PostregSQL enums, the answer there is yes and no. It will work in terms of reading and writing in the same way the patch did; it will simply call getInt/getString and let the lovely pgsql JDBC driver do any conversion it can. If you mean in terms of guessing how the enum value mapping should work based on JDBC metadata, no, thats (hopefully) obviously not possible. Also, be aware that it is also not possible to effectively use schema export creating these PostgreSQL enums.
I'll be pushing this work in a few, please try it.