How does the book cover vendor specific implementations of JPA? Like Weblogic, Jboss etc? Does it provide sample projects showing the implementation?
Joined: Jan 23, 2004
One of the most confusing or rather a tedious implementations of JPA is the object relational mapping. In my experience, when the database is super normalized it becomes hard to annotate them. For eg, consider a two tables order and activity and both have one to many relationships with properties. Property table itself has a composite foreign key for identified by either order entity or activity entity and has the primary key of the corresponding table to annotate if it belongs to either order or activity. We implemented OpenJpa and ended up creating two entities names OrderProperty and ActivityProperty both pointing to the same table. But i'm not sure if it was the right approach. Does the book cover or give tips to handle such scenarios?
The book tries to explain the JPA specification and not dive into the specifics of the particular implementations. You should see the specific vendors docs for that.
We do give hints on how to map some scenarios and hints for when to use a given type of inheritance, as well as describe how to use the new composite primary key mechanisms. However, there is only so much time and space and the book simply cannot cover even a fraction of every possible application use case. If you are happy with the solution that you are using and it is meeting your needs then who am I to tell you that there is a better way?