9.4. The Java Persistence API

We now store and load objects with the Java Persistence API. This is the API you use either in a Java SE application or with EJB 3.0 components, as a vendor-independent alternative to the Hibernate native interfaces.

You've read the first sections of this chapter and know the object states defined by JPA and how they're related to Hibernate's. Because the two are similar, the first part of this chapter applies no matter what API you'll choose. It follows that the way you interact with your objects, and how you manipulate the database, are also similar. So, we also assume that you have learned the Hibernate interfaces in the previous section (you also miss all the illustrations if you skip the previous section; we ...

Get Java Persistence with Hibernate now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.