Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 6111 invoked from network); 2 Jan 2007 23:10:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jan 2007 23:10:46 -0000 Received: (qmail 3078 invoked by uid 500); 2 Jan 2007 23:10:44 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 3051 invoked by uid 500); 2 Jan 2007 23:10:44 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 3031 invoked by uid 99); 2 Jan 2007 23:10:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2007 15:10:44 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mprudhomapache@gmail.com designates 66.249.82.226 as permitted sender) Received: from [66.249.82.226] (HELO wx-out-0506.google.com) (66.249.82.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2007 15:10:33 -0800 Received: by wx-out-0506.google.com with SMTP id i26so5954602wxd for ; Tue, 02 Jan 2007 15:10:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=UCU2jX0sOZ/f23vhj3k3qBaU0LZKHb9fzwEl8ZjnVPo514WJa3ScvUNurTgPIJnX0VH4Thk0fEP0KIECyxF6GMHugYmxMV8bUK2qWDvBrpYrm8SuXypxSHdL+rKcHC6fr2PzWDVGE0Ic9xQtunZuwvwu+LMznvQrwcePO9PpOw0= Received: by 10.70.15.15 with SMTP id 15mr11086092wxo.1167779411231; Tue, 02 Jan 2007 15:10:11 -0800 (PST) Received: from ?192.168.1.104? ( [66.248.222.34]) by mx.google.com with ESMTP id i19sm39762685wxd.2007.01.02.15.10.09; Tue, 02 Jan 2007 15:10:10 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <89c0c52c0701021503q4bb23dcah248f6fa99c60564a@mail.gmail.com> References: <89c0c52c0701021503q4bb23dcah248f6fa99c60564a@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <33F573E5-44D3-4FD9-A660-2FA92ACBA57D@apache.org> Content-Transfer-Encoding: 7bit From: Marc Prud'hommeaux Subject: Re: @IdClass annotation for id field of type byte[] Date: Tue, 2 Jan 2007 18:09:59 -0500 To: open-jpa-dev@incubator.apache.org X-Mailer: Apple Mail (2.752.3) Sender: Marc Prud'hommeaux X-Virus-Checked: Checked by ClamAV on apache.org Kevin- > Also, this exception is supposedly only being produced with Oracle, > not > DB2. (I have not been able to verify that yet.) This would seem to > indicate that it's dictionary-specific, but I'm not seeing anything > there > yet... Does Oracle even support blob primary keys? My recollection is that it didn't... I suspect that the problem might be that since Oracle has a number of problems with in-line blobs in statements, we frequently issue a separate statement to load and store blobs from and to rows, but if it is the primary key, then we might be conflicting with that. Can you post the complete stack trace? On Jan 2, 2007, at 6:03 PM, Kevin Sutter wrote: > Hi, > Some experimenting with the @IdClass support is producing a strange > exception message when attempting to map an id field of type byte[]. > According to the OpenJPA documentation, we need to use an Identity > Class to > use byte[] as the id field type. Something like this: > > @Entity > @IdClass (jpa.classes.Guid.class) > @Table(name="AGENT", schema="CDB") > public class Agent { > > @Id > @Column(name="ME_GUID") > private byte[] guid; > ... > > The Guid class has also been created with a single instance > variable of type > byte[]: > > public class Guid implements Serializable { > private byte[] guid; > ... > > But, during the loading of the database, I am getting the following > error... > > org.apache.openjpa.util.MetaDataException: You cannot join on column " > AGENT.ME_GUID". It is not managed by a mapping that supports joins > > First off, the exception is confusing since I don't believe I am > attempting > to do a join. The guid column is in the same table as the Agent. > > Also, this exception is supposedly only being produced with Oracle, > not > DB2. (I have not been able to verify that yet.) This would seem to > indicate that it's dictionary-specific, but I'm not seeing anything > there > yet... > > I am in the process of validating the problem, but I thought I > would drop a > line to the team to see if it rings any bells... > > Thanks, > Kevin