db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alvaro Coronel <alvarocorone...@yahoo.com>
Subject Re: Can a Java object or byte[] be used as a primary key?
Date Tue, 15 Aug 2006 13:26:29 GMT
Wow! What SQL database supports having a byte[] field as primary key?

Regards,
Álvaro.

----- Original Message ----
From: Jeffrey Dawson <jeffrey_dawson@guardium.com>
To: torque-user@db.apache.org
Sent: Monday, August 14, 2006 4:15:58 PM
Subject: Can a Java object or byte[] be used as a primary key?

I want to use a fixed size byte array as the primary key to a table, but
Torque can't convert between ObjectKey and byte[], and gets compilation
errors in the Base classes.

I was going to try using BigInteger objects as the primary key instead,
but then I get errors during the code generation. The xml for the column
definition looks like this:
      <column
          name="DATUM_ID"
          primaryKey="true"
          required="true"
          type="JAVA_OBJECT"
          javaType="object"
          autoIncrement="false"/>

Am I asking for the impossible?



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org






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