openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Re: @IdClass annotation for id field of type byte[]
Date Wed, 03 Jan 2007 00:13:37 GMT
Marc,
I'm working on obtaining the call stack...  :-)  This was reported by an
external user and I haven't reproduced the problem yet.  DB2 is much easier
for me to access than Oracle...  :-)

I had searched for an answer about valid primary key types for Oracle, but I
didn't find anything that was definitive.  I saw similar questions, but
nobody has answered that specific question yet.

Kevin

On 1/2/07, Marc Prud'hommeaux <mprudhom@apache.org> wrote:
>
> 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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message