db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject RE: [torque-gen 3.2-rc1] Problem with PostgreSQL and BIT default value
Date Mon, 01 Aug 2005 08:03:15 GMT





Hi Serge,

sorry I do not have the time at the moment to look into this myself, but
have you tried
<column name="ALLOW_USER_SET" default="false" type="BIT"/>
?

Background: Most probably your definition has worked within torque 3.1.x,
but the songle quotes in '0' causes problems with other dbs like hibernate,
so it got changed (should be in the list of changes)

   Thomas


Jan Bauer | Stefan Eichenhofer

Serge Huber <shuber2@jahia.com> schrieb am 29.07.2005 16:27:45:

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


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