From dev-return-14224-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Thu Nov 12 17:48:36 2009 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 33617 invoked from network); 12 Nov 2009 17:48:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Nov 2009 17:48:35 -0000 Received: (qmail 21595 invoked by uid 500); 12 Nov 2009 17:48:35 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 21533 invoked by uid 500); 12 Nov 2009 17:48:35 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 21523 invoked by uid 99); 12 Nov 2009 17:48:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Nov 2009 17:48:35 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kwsutter@gmail.com designates 74.125.78.25 as permitted sender) Received: from [74.125.78.25] (HELO ey-out-2122.google.com) (74.125.78.25) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Nov 2009 17:48:27 +0000 Received: by ey-out-2122.google.com with SMTP id 22so545708eye.45 for ; Thu, 12 Nov 2009 09:48:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=zlXd66zHIjaI9tK5lKX56MfJtx2LX5BY4cAzC+TZ+gk=; b=OMvJgo+JX/ydmbTbT/+cHvjJtdsdlYduh0hN2nlZQjliafgVntkIBdYSPqRh/YkZr/ fp4fvw50DfXNWGgwdS9mknhDJtOpTe0V0A3OfelYNn0MZ1oHYg1Et1jQlGYAu/PNOT+S K00JX5k8U6PEvf30fMqzDbdQw/0JeqbJBT+NU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=YS1irBMpSD2s16yg5W7gEg9KhicvN4aM7n0b3guMJUejvlrxV5FJ5SgKPKA3X2LBlG pKl2ymfEPm2hSr4UBJBiBzu/XbqJSusOF4WRqCFxtG/r0nMVasO/TqFHb0F6aMcDOVEK 3A4AUbZgyzWJejwXJs8vu4D4yeSsb3GlJl6DY= MIME-Version: 1.0 Received: by 10.213.104.75 with SMTP id n11mr2676432ebo.70.1258048087097; Thu, 12 Nov 2009 09:48:07 -0800 (PST) In-Reply-To: <4AFC3BDD.50303@gmail.com> References: <4AFC3BDD.50303@gmail.com> Date: Thu, 12 Nov 2009 11:48:07 -0600 Message-ID: <89c0c52c0911120948p635d3d22r86fb48d5c661bcd1@mail.gmail.com> Subject: Re: Inner Class Entities From: Kevin Sutter To: dev@openjpa.apache.org Content-Type: multipart/alternative; boundary=001636c5ba2a57844c04783025c0 X-Virus-Checked: Checked by ClamAV on apache.org --001636c5ba2a57844c04783025c0 Content-Type: text/plain; charset=ISO-8859-1 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 it... If you want to test this out and write up the documentation, I'm sure the project would enjoy the help... :-) Thanks, Kevin [1] http://openjpa.apache.org/builds/latest/docs/manual/manual.html#jpa_overview_pc_restrict 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 > --001636c5ba2a57844c04783025c0--