db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piechu <piech...@wp.pl>
Subject Re: Problem with BOOLEAN fields
Date Sun, 15 May 2005 20:11:44 GMT
Hello

Thanks. But where can I find information about which Torque type is an 
equivalent for the type from database ? is there any rule.

Another problem is - when I used type "CLOB" I've got BUILDING FAILED 
message caused in *.jelly - and it's probably something wrong with 
Torque types. What should I use for Text filed in database and is there 
any equivalent type for type Money in database?

And last thing - should schema.xml file describe whole database - or if 
some things are programmed in database, such as auto numeration for 
primary keys, unique fields, default values - should it be also included 
in schema.xml file? If not - how should I mark a primary key which is 
auto-numeration field?

Greetings
Jakub Piechnik

Thomas Fischer wrote:

>
>
>Hi,
>
>Boolean is not a Torque type. The type in the schema xml must be declared
>in the
>dtd, this is
>
>  BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
>| REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
>| DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
>| NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
>| BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
>| DOUBLE
>
>
>For Booleans, use BIT, BOOLEANINT, or BOOLEANCHAR
>
>   Thomas
>
>"Piechu Piechu" <piechutm@wp.pl> schrieb am 15.05.2005 15:00:02:
>
>  
>
>>Hello
>>
>>I'm rather new to Torque, so maybe my problem seems very easy, but I
>>haven't any idea how to sole it.
>>
>>I've created a schema file with my database description. I have
>>there few fields that are pointed as a BOOLEAN type. After succesful
>>build using Maven, when I put all classes to Eclipse - there are a
>>lot of errors with fields which were pointed as Boolean type. These
>>errors are for example:
>>-> private int clubDeleted = new int(false);
>>/*
>>   Where in schema file was:
>>   <column name="club_deleted"
>>   type="BOOLEAN"
>>   default="false"/>
>>*/
>>-> obj.setClubDeleted(row.getValue(offset + 2).$col.VillageMethod);
>>/*
>>   Eclipse doesn't recognize the '$col' (it says "$col cannot be
>>resolved or is not a field) - the same occurs with every fields that
>>was pointed as BOOLEAN type
>>*/
>>
>>They only occure in both Base* and Base*Peer files.
>>I'm using JDBC driver -> postgresql-8.1dev-400.jdbc3.jar, java 1.
>>5_02 and torque 3.1.1
>>
>>Greetings
>>
>>Jakub Piechnik
>>


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