David- Per the JPA spec --
The entity class must have a no-arg constructor. The entity class may have other constructors as well. The no-arg constructor must be public or protected. ...so if your Entity doesn't have one, OpenJPA will do it for you. -- Thanks, Rick On Fri, Dec 4, 2009 at 1:29 PM, KARR, DAVID (ATTCINW) <[email protected]>wrote: > I'm reading the OpenJPA doc, and I see that the enhancer creates a > protected no-args constructor if there is no public one. Why exactly > does it do that? What is the point of creating a protected constructor > instead of letting the JVM create the public one? The doc only says > that it does this, not why. >
