How to map Duration type with JPA

Posted by HDave on Stack Overflow See other posts from Stack Overflow or by HDave
Published on 2010-05-13T20:30:59Z Indexed on 2010/05/13 20:34 UTC
Read the original article Hit count: 314

Filed under:
|
|
|
|

I have a property field in a class that is of type javax.xml.datatype.Duration. It basically represents a time span (e.g. 4 hours and 34 minutes).

JPA is telling me it is an invalid type, which doesn't shock me.

Whats a good solution this? I could implement my own Duration class, but I don't know how to get JPA to "accept" it as a datatype.

© Stack Overflow or respective owner

Related posts about jpa

Related posts about time