openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <>
Subject Re: Why does the enhancer create a PROTECTE no-args constructor by default?
Date Fri, 04 Dec 2009 20:31:24 GMT

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. if your Entity doesn't have one, OpenJPA will do it for you.

On Fri, Dec 4, 2009 at 1:29 PM, KARR, DAVID (ATTCINW) <>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.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message