From dev-return-6696-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Mon Nov 05 16:10:17 2007 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 29581 invoked from network); 5 Nov 2007 16:10:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Nov 2007 16:10:17 -0000 Received: (qmail 4957 invoked by uid 500); 5 Nov 2007 16:08:54 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 4933 invoked by uid 500); 5 Nov 2007 16:08:54 -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 4921 invoked by uid 99); 5 Nov 2007 16:08:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2007 08:08:54 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.86.168.178 is neither permitted nor denied by domain of geir@pobox.com) Received: from [216.86.168.178] (HELO mxout-03.mxes.net) (216.86.168.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2007 16:09:24 +0000 Received: from [10.6.13.32] (unknown [216.174.90.9]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id D44C923E4A0 for ; Mon, 5 Nov 2007 11:08:31 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <48D4843F-E9D6-46B2-B88D-E4B44D6D2CF3@pobox.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: dev@openjpa.apache.org From: "Geir Magnusson Jr." Subject: Problem with @ManyToOne and @JoinTable Date: Mon, 5 Nov 2007 11:08:38 -0500 X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org I'm a newbie, so forgive me if I'm not asking the question the right way. I have a join table in my DB : +-------------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+------------------+------+-----+---------+-------+ | showId | int(11) unsigned | NO | PRI | | | | inputFileId | int(11) unsigned | NO | PRI | | | +-------------+------------------+------+-----+---------+-------+ where showId and inputFileID are PKs in the show table and inputfile table. In my code for the InputFile class : @ManyToOne @JoinTable(name="Show2InputFile", joinColumns = @JoinColumn(name="inputFileId"), inverseJoinColumns = @JoinColumn(name="showId")) public Show getShow() { return show; } When JPA is instrumenting my classes, it complains : Caused by: org.apache.openjpa.persistence.ArgumentException: You have supplied columns for "com.joost.model.logistics.InputFile.show", but this mapping cannot have columns in this context. I don't quite understand the error. I use this same thing elsewhere (I think) w/o a problem. Can someone give me a hint? geir