What type conversion functionality is supported with JPA 2.0 in JBoss EAP 6?

Solution Verified - Updated -

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.Timestamp and TIMESTAMP.

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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content