Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 64034 invoked from network); 21 Dec 2010 17:36:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Dec 2010 17:36:06 -0000 Received: (qmail 5728 invoked by uid 500); 21 Dec 2010 17:36:06 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 5672 invoked by uid 500); 21 Dec 2010 17:36:05 -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 5664 invoked by uid 99); 21 Dec 2010 17:36:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Dec 2010 17:36:05 +0000 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kwsutter@gmail.com designates 209.85.214.43 as permitted sender) Received: from [209.85.214.43] (HELO mail-bw0-f43.google.com) (209.85.214.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Dec 2010 17:35:58 +0000 Received: by bwz14 with SMTP id 14so4589747bwz.30 for ; Tue, 21 Dec 2010 09:35:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=x3ZHHSvA9LJUzK4Cd9TPA7amJ8kRfVqkiQ/Hh4arTS0=; b=ugAcol0zBFwtoD8IVn6Ywcg9hIXgRgc6p3QISMMJ9A59bLgI/6lG7IADi15pZna9+F 7Nz3aCV36RrhC0aHCLClBVe6pRn80ccEQEFZC8yNB1rMLCqOEnZfKtSzqZP7LmkGGZoV PKWz7yJTf853BE2YCJNT5F+UVWwiMMmzDzU9g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=VdN7JmguB29IMH2LF1wpIfPF42vjWG57/Ai84GRpLDq7s9Tuf9jwXNewhZ1J9JvCEN YUEPC++DK3nnYlHd547oISHEn0FduqTJ3DYQ5+9YP1I+ohoXLHl2HKq6oVEvIa+LtI/0 4hFlb/zD2cO9a3uUl2wkvZygwqwNhqvdRRk4g= Received: by 10.204.100.136 with SMTP id y8mr4996434bkn.171.1292952938631; Tue, 21 Dec 2010 09:35:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.58.142 with HTTP; Tue, 21 Dec 2010 09:35:18 -0800 (PST) In-Reply-To: <1292929601067-5855389.post@n2.nabble.com> References: <1292929601067-5855389.post@n2.nabble.com> From: Kevin Sutter Date: Tue, 21 Dec 2010 11:35:18 -0600 Message-ID: Subject: Re: Urgent solution EJB3.0 with OpenJPA To: dev@openjpa.apache.org Content-Type: multipart/alternative; boundary=001485f6d0509e53910497ef10a9 X-Virus-Checked: Checked by ClamAV on apache.org --001485f6d0509e53910497ef10a9 Content-Type: text/plain; charset=ISO-8859-1 Hi Rajesh, Sure, OpenJPA supports this join table approach for one-to-many mappings. OpenJPA 2.0.x also supports the ability to use foreign keys for a unidirectional one-to-many mapping. You just need to tell us what the join column should be (vs the join table). The latter might be a cleaner approach -- just to avoid the extra join tables. If you want OpenJPA to create the necessary join tables, just use the following property in your persistence.xml: If you want to use the existing tables as created by TopLink, then you'll probably have to use the @AssociationOverride to match up the table and column names. Everything you are trying to do should be doable with WAS and OpenJPA. Are you hitting a specific concern or just asking questions before attempting? Thanks, Kevin On Tue, Dec 21, 2010 at 5:06 AM, Rajesh Yarlagadda < yarlagaddarajeshbabu@hotmail.com> wrote: > > Hi , > > i am working on EJB3.0 with Toplink for container managed transactions on > Glassfish server. > > i'm moving to WAS7 with Apache OpenJPA. > > i have a problem in this scenario: > > i have two entities TableA.java(TableA in database) and TableB.java(TableB > in database) with unidirectional one-to-many from TableA(one) to > TableB(many). > > While persisting the TableA, toplink orm creates another JOIN table for > one-to-many mapping with name " TableA_TableB" table with TableA primary > key > as foriegn and TableB primary key as foriegn and both act as composite > primary key mantains one-to-many mappings. > > Is there any such kind on mechanism implemented by OpenJPA EJB3.0 container > managed one-to-many mappings to create or identify existed the JOIN Table? > > Thanks, > Rajesh Yarlagadda > -- > View this message in context: > http://openjpa.208410.n2.nabble.com/Urgent-solution-EJB3-0-with-OpenJPA-tp5855389p5855389.html > Sent from the OpenJPA Developers mailing list archive at Nabble.com. > --001485f6d0509e53910497ef10a9--