JPA with Java 8 API Date

Asked

Viewed 138 times

1

With the various enhancements of the new Java 8 Datetime API, how do I instantiate a Data for an entity in JPA? It is already possible, for example, to have a Yearmonth field that JPA controls?

1 answer

1


For now, native to JPA, not yet. But it will. I don’t know if in JPA 2.2 specification or JPA 3.0. See here specification which has been proposed but not answered.

What you can do is convert types as explains that article. JPA even provides an elegant solution for these conversions.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.