Return-Path: Delivered-To: apmail-openjpa-users-archive@locus.apache.org Received: (qmail 69299 invoked from network); 26 Nov 2008 04:39:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Nov 2008 04:39:36 -0000 Received: (qmail 28889 invoked by uid 500); 26 Nov 2008 04:39:46 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 28857 invoked by uid 500); 26 Nov 2008 04:39:46 -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 Received: (qmail 28843 invoked by uid 99); 26 Nov 2008 04:39:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Nov 2008 20:39:46 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists+1214986160035-208411@n2.nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Nov 2008 04:38:19 +0000 Received: from tervel.nabble.com ([192.168.236.150]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1L5CB6-0004ZI-Vm for users@openjpa.apache.org; Tue, 25 Nov 2008 20:39:04 -0800 Message-ID: <1227674344979-1579596.post@n2.nabble.com> Date: Tue, 25 Nov 2008 20:39:04 -0800 (PST) From: Anshuk To: users@openjpa.apache.org Subject: One to Many relation with custom objects MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: Anshuk_Chaudhuri@infosys.com X-Virus-Checked: Checked by ClamAV on apache.org Hi I need to map custom objects in orm.xml. There is an Account class(attached the file) that contain attribute account number and transactions objects of type Transactions class (attached the file).The transactions class in turn gets and sets a list of Transaction (object). The transaction contains many attributes (which is fine, not attached the file) and the transactions entity in the orm.xml has been set as one-to-many which is it shoud be. The issue is that the account object would have multiple transaction and that would be eventually set using the set transactions method. But I am not sure how to map this one-to-many relationship in the orm.xml for the account entity. i have mapped accountNumber as < id> in orm.xml. now i need to map transactions into it. orm schema is not allowing One-to-many inside the account element. Kindly someone help me on the same. http://n2.nabble.com/file/n1579596/Account.txt Account.txt http://n2.nabble.com/file/n1579596/Transactions.txt Transactions.txt Thanks. Regards, Anshuk Pal Chaudhuri -- View this message in context: http://n2.nabble.com/One-to-Many-relation-with-custom-objects-tp1579596p1579596.html Sent from the OpenJPA Users mailing list archive at Nabble.com.