What type conversion functionality is supported with JPA 2.0 in JBoss EAP 6?
Issue
Does JPA 2.0 perform automatic data conversions (similar to those in JPA 2.1) between Java types and table column types or do I have to code the conversion explicitly using the @Convert and @Converter annotations? JPA 2.1, for instance, automatically handles the following conversions:
- between boolean and numeric types:
true== 1,false== 0 - between
java.sql.TimestampandTIMESTAMP.
Environment
- JBoss Enterprise Application Platform (EAP) 6
- Hibernate 4/JPA 2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
