db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Tilsted ...@mt3.dk>
Subject Using bit in primary key not supported?
Date Fri, 08 Oct 2010 02:59:45 GMT
  In my schema.xml file I have

<table name="templatevalue" idMethod="native">
<column name="name" primaryKey="true" required="true" size="255" 
type="VARCHAR"/>
<column default="true" name="preview" primaryKey="true" required="true" 
type="BIT"/>
<!-- Other fields removed -->
</table>

But it seems like torque is unable to handle a primary key with a bit 
field, because it generate the file

BaseTemplatevalue.java

with the function public ObjectKey getPrimaryKey()
which contain the line

pks[1] = SimpleKey.keyFor(getPreview());

But eclipse complains that there is no SimpleKey.keyFor which take a 
boolean argument. So am I doing something wrong, or is this just not 
supported.

This is using torque 3.3 with postgresql 8.4.

It's easy to work-around using an int, but I would like to keep it 
boolean, because it is a boolean :}

Martin




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


Mime
View raw message