openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <>
Subject @IdClass annotation for id field of type byte[]
Date Tue, 02 Jan 2007 23:03:17 GMT
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:

@IdClass (jpa.classes.Guid.class)
@Table(name="AGENT", schema="CDB")
public class Agent {

    private byte[] guid;

The Guid class has also been created with a single instance variable of type

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

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...


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