How to map Duration type with JPA
- by HDave
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.