db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Huber <shub...@jahia.com>
Subject [torque-gen 3.2-rc1] Problem with PostgreSQL and BIT default value
Date Fri, 29 Jul 2005 14:27:45 GMT

Hi all,

I'm having some problems with PostgreSQL and Torque Gen 3.2 rc 1.

I have the following column declaration in my XML schema file :

        <column name="ALLOW_USER_SET" default="0" type="BIT"/>
        <column name="REQUIRES_CERTIFICATE" default="0" type="BIT"/>

This gets generated to :

    ALLOW_USER_SET BOOLEAN default 0,
    REQUIRES_CERTIFICATE BOOLEAN default 0,

This does not work with PostgreSQL, because it considers 0 as an integer 
and does not perform implicit conversions. If this was generated instead :

    ALLOW_USER_SET BOOLEAN default '0',
    REQUIRES_CERTIFICATE BOOLEAN default '0',

It would work.

I looked a bit into Torque's code base, and looked at 
org.apache.torque.engine.database.model.TypeMap.TEXT_TYPES, but these 
are shared among all platforms, so it doesn't work as expected.

Is there anything I'm doing wrong ? Do you have any suggestions ? Thank you.

Regards,
  Serge Huber.

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


Mime
View raw message