openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <>
Subject Re: Inner Class Entities
Date Thu, 12 Nov 2009 17:48:07 GMT
Good question, Tim.

The JPA spec indicates that an Entity needs to be a top-level class (section
2.1 of JPA 2.0 spec).  But, I noticed in our OpenJPA documentation that we
have overridden the ability to define an Entity as final class with final
methods.  Section 1 [1] of the documentation indicates that OpenJPA doesn't
add any restrictions to the Entity definition.  So, although it's not
stated, it looks like we are attempting to support inner classes due to your
testcase findings.  But, without proper documentation, I wouldn't count on

If you want to test this out and write up the documentation, I'm sure the
project would enjoy the help...  :-)



On Thu, Nov 12, 2009 at 10:46 AM, Tim McConnell <>wrote:

> Hi, I'm wondering if there is any documentation, specifications, and/or
> known rules that govern the usage of Inner Classes as Entities ?? I haven't
> been able to find any although I do see  a couple of examples of the @Entity
> being used on inner classes in some of the OpenJPA testcases. Unfortunately,
> those examples are not quite enough for me to fully understand the
> restrictions or implications. Thanks for any additional information...
> --
> Thanks,
> Tim McConnell

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