db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From T E Schmitz <mail...@numerixtechnology.de>
Subject Postgresql - invalid WHERE clause for BOOL columns generated (adapter fix)
Date Mon, 03 May 2004 11:55:20 GMT
Hello,

I just hit upon a problem with Postgresql columns of type bool.

Torque generates invalid SQL for bool comparisons:
generates   : WHERE xyz=0
needs to be : WHERE xyz=FALSE (or WHERE xyz='0')

The fault is in the adapter. I amended the adapter as follows and it 
works fine now:
public String getBooleanString(Boolean b)
{
   //return (b == null) ? "0" : (Boolean.TRUE.equals(b) ? "1" : "0");
   return (b == null) ? "NULL" : (Boolean.TRUE.equals(b) ? "TRUE" : 
"FALSE");
}


-- 


Regards,

Tarlika Elisabeth Schmitz

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