DSM

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Can a Java object or byte be used as a primary key?

    0 answers - 1717 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    It sounds like your java object is storing application data, is this true?
    In a good database design a primary key is of no significance
    to the application other than a means to reference other data.
    You may need to reconsider your database design.
    Message
    From: Alvaro Coronel [mailto:alvarocoronel67 (AT) yahoo (DOT) com]
    Sent: Tuesday, August 15, 2006 6:26 AM
    To: Apache Torque Users List
    Subject: Re: Can a Java object or byte[] be used as a primary key?
    Wow! What SQL database supports having a byte[] field as primary key?
    Regards,
    Message
    From: Jeffrey Dawson <jeffrey_dawson (AT) guardium (DOT) com>
    To: torque-user (AT) db (DOT) 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 Key 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="JAVABJECT"
    javaType="object"
    autoIncrement="false"/>
    Am I asking for the impossible?
    To unsubscribe, e-mail: torque-user-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: torque-user-help (AT) db (DOT) apache.org
    To unsubscribe, e-mail: torque-user-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: torque-user-help (AT) db (DOT) apache.org

Re: Can a Java object or byte be used as a primary key?


max 4000 letters.
Your nickname that display:
In order to stop the spam: 3 + 2 =
QUESTION ON "DSM"

EMSDN.COM