I have boolean fields declared in the data source descriptor with sqlStorageStrategy "integer". For example:
This works fine for fetches and updates but upon delete operations the generated SQL has string values "true" and "false" rather than numbers in the where clause. Like this (with some formatting of mine) :
This ends up with "java.sql.SQLException: ORA-01722: invalid number" because BOOLEAN_VALUE is INTEGER in the database.
Regards
Nikolay
Code:
<field name="BOOLEAN_VALUE" type="boolean" sqlStorageStrategy="integer" title="Boolean"/>
Code:
DELETE FROM DATA_TYPE WHERE ( DATA_TYPE.NAME='name' AND DATA_TYPE.VERSION='28' AND DATA_TYPE.DATE_TIME_VALUE=TO_DATE('2010-11-22 00:00:00','YYYY-MM-DD HH24:MI:SS') AND DATA_TYPE.BOOLEAN_VALUE='false' AND DATA_TYPE.ID='62' AND DATA_TYPE.LONG_VALUE='1111' AND DATA_TYPE.STRING_VALUE='asd' AND DATA_TYPE.DATE_VALUE=TO_DATE('2009-11-10 00:00:00','YYYY-MM-DD HH24:MI:SS'))
Regards
Nikolay
Comment