By krishnas
via arsenalist.com
Published: May 13 2007 / 18:02
One of the somewhat unclear aspects of the Java Persistence API is exactly how Java entities are populated from database tables. Those of you familiar with Hibernate probably know that you require a setter method in your Java POJO which corresponds to the column that you want mapped. JPA lifts that requirement and instead gives the option of not specifying any accessor methods in favor of reflection. Whether this is good or bad is for your application to decide.
Comments
ggeremy replied ago:
Nice. It clears up the confusion. Annotating fields is neater but it does come at a performance hit.
pansapien replied ago:
This article needs to expand beyond that which is in the spec. It should provide insight into non-obvious issues that can arise with either approach. Further it should also quantify performance differences between the different approaches across a few standard implementations.
As it currently stands, this article isn't worth the time it took to read.
Voters For This Link (12)
Voters Against This Link (2)