I converted my project over from java.util.Date to java.sql.Timestamp for entity fields after I figured that would give me more room to maneuver with a new requirement for time fields.

It went smoothly with OpenJPA and made the MVC layer's type converter code a cinch to refactor.

However I then ran my tests under Hibernate JPA and Toplink Essentials, and both complained bitterly that I was violating the spec and threw exceptions.

Looking through the JPA 1 spec, I see where I have transgressed (9.1.20):

"The Temporal annotation must be specified for persistent fields or properties of type java.util.Date and java.util.Calendar. It may only be specified for fields or properties of these types."

Is the OpenJPA interpretations deliberately including Timestamp or is that considered an OpenJPA feature?

Is there any change in JPA 2?

Also, can anyone give a URL for the JPA 2 spec pdf? Google turned up nothing.


Thanks
Adam

Reply via email to