I can't seem to find a way to use a boolean property on oracle without creating a custom type.
This page in the wiki (
http://www.hibernate.org/189.html) claims that we should write a custom type for mapping boolean types in oracle.
Before i start using this custom type, I only want to verify that hibernate does not support oracle booleans by default...
Mapping documents:
<property name="isUndoable" type="boolean" />
Schema export for oracle 9
create table JBPM_INVOKELOG (
...
isUndoable NUMBER(1,0),
...
);
Hibernate query
select il
from il in class org.jbpm.model.log.impl.InvocationLogImpl
where ...
and il.isUndoable = true
order by il.date desc
Translated SQL query
Hibernate: select il.id ...
from JBPM_INVOKELOG il ...
where ... and (il.isUndoable=true )
order by il.date_ desc
Exception
Caused by: java.sql.SQLException: ORA-00904: "TRUE": invalid identifier
Hibernate version:
2.1.6
Name and version of the database you are using:
oracle 9.2.0.4
regards,
tom baeyens
http://jbpm.org
ps : great work guys ! keep it up.