-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: boolean property on oracle
PostPosted: Thu Sep 23, 2004 8:42 am 
JBoss jBPM Developer
JBoss jBPM Developer

Joined: Thu Aug 28, 2003 11:56 am
Posts: 30
Location: Belgium
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 23, 2004 9:00 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
use hibernate.query.substitutions true 1, false 0


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.