Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 15697 invoked from network); 24 Jun 2010 18:27:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Jun 2010 18:27:30 -0000 Received: (qmail 73155 invoked by uid 500); 24 Jun 2010 18:27:30 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 73000 invoked by uid 500); 24 Jun 2010 18:27:29 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Delivered-To: moderator for users@openjpa.apache.org Received: (qmail 60067 invoked by uid 99); 24 Jun 2010 18:16:22 -0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At0BAL89I0xbsg8O/2dsb2JhbAAHkwPPXYUhBA Message-ID: <4C23A0D9.3030103@u-mangate.com> Date: Thu, 24 Jun 2010 20:15:53 +0200 From: Eric Charles User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100322 Thunderbird/3.0.3 MIME-Version: 1.0 To: users@openjpa.apache.org CC: James Developers List Subject: Re: OpenJPA usage at Apache James References: <4C1FB370.8050108@apache.org> <1974057632.28425.1277312695604.JavaMail.root@srv001> <947295135.31731.1277350044259.JavaMail.root@srv001> In-Reply-To: <947295135.31731.1277350044259.JavaMail.root@srv001> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Pinaki, OpenJPA 2.1.0-SNAPSHOT didn't help. I also made a separate sample with a Message, AbstractMessage and Header (a message has many headers). I defined: - @OneToMany(mappedBy...) with type Header on the AbstractMessage - @ManyToOne with type AbstractMessage on the Header. With that config, the FK is not created (nor the corresponding message_id column in Header table). I receive no exception. Another question was the definition of indexes: Does JPA standard provide this ? Tks, Eric On 06/24/2010 05:26 AM, Eric Charles wrote: > Hi Pinaki, > > We use the maven downloaded jar release 422266:935683 from > 22-Apr-2010, so we don't have the patch for the MappedSuperClass. > I didn't find a recent 2.0.0-SNAPSHOT on > http://people.apache.org/maven-snapshot-repository/ nor on > https://repository.apache.org/index.html. > > Will try with 2.1.0-SNAPSHOT. > > The entites can be found here: > [1] AbstractJPAMessage > http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/AbstractJPAMessage.java?view=markup > > [2] JPAHeader > http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/JPAHeader.java?view=markup > > [3] JPAProperty > http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/JPAProperty.java?view=markup > > [4] JPAMessage > http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/JPAMessage.java?view=markup > > [5] JPAStreamingMessage > http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/openjpa/JPAStreamingMessage.java?view=markup > > > Tks, > > Eric > > > On 06/23/2010 07:04 PM, Pinaki Poddar wrote: >> Hi, >> The "mappedBy" mapping on abstract class should work and the >> relations need >> not be redefined in the concrete subclass. >> But a critical bug on MappedSuperclass had been found recently -- >> which *may >> be* impacting the mapping. >> >> 1. Which OpenJPA revision being used? >> $ java -jar /path/to/openjpa.jar >> shows the revision number. >> >> 2. If the used revision is prior to 952893 (dated June 8,2010), is it >> possible to switch to a post-952893 version and see if that resolves the >> issue? >> >> 3. Can you please post the relevant entity classes (JPAMesaage etc.) for >> further analysis? >> >> >> >> ----- >> Pinaki >