-->
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.  [ 3 posts ] 
Author Message
 Post subject: Hibernate-Oracle issue...Need Help!!
PostPosted: Tue Feb 21, 2006 2:52 am 
Newbie

Joined: Tue Feb 21, 2006 2:42 am
Posts: 2
I am using Oracle 10g and with Jboss 3.0.8, hibernate3.0.jar and ojdbc14.jar. Also I am using Oracle9Dialect.
I hav a table in Oracle which has "level" as one of the column name. I have mapped this table in hibernate. But the problem is when hibernate generates select query for this table it does not enclose the level column in double quotes (") and hence the query fails when Oracle database tries to execute the query generated by hibernate. Since level is a keyword in Oracle, it needs to be enclosed in double quotes when it is used in query but hibernate doesn't seem to do that.
My problem is i can't change the column name to anything other than level since it is used in some place in my application. I don't know hoe to tackle this...need help.


Top
 Profile  
 
 Post subject: Re: Hibernate-Oracle issue...Need Help!!
PostPosted: Tue Feb 21, 2006 3:04 am 
Regular
Regular

Joined: Wed Oct 15, 2003 4:40 pm
Posts: 67
trupti wrote:
My problem is i can't change the column name to anything other than level since it is used in some place in my application. I don't know hoe to tackle this...need help.


Tried escaping the names in the mapping document (section 5.4 in the manual)?


Top
 Profile  
 
 Post subject: Re: Hibernate-Oracle issue...Need Help!!
PostPosted: Tue Feb 21, 2006 3:52 am 
Newbie

Joined: Tue Feb 21, 2006 2:42 am
Posts: 2
Nik wrote:
trupti wrote:
My problem is i can't change the column name to anything other than level since it is used in some place in my application. I don't know hoe to tackle this...need help.


Tried escaping the names in the mapping document (section 5.4 in the manual)?



Nik,
Thanks for such a prompt reply. It worked!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.