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.  [ 1 post ] 
Author Message
 Post subject: Hibernate intermittantly generates invalid SQL (Oracle)
PostPosted: Thu Mar 23, 2006 5:16 pm 
Newbie

Joined: Mon Sep 26, 2005 2:40 pm
Posts: 17
Location: Seattle
Occasionally, our automated unit tests will fail with an illegal SQL exception from Oracle, talking about SQL generated by Hiberate. It's never the same test, but always the same SQL.

Has anyone else experienced this? I've attached the generated SQL below, note the difference in the from clause:

select
user0_.USER_ID as USER1_34_1_,
user0_.USER_NAME as USER2_34_1_,
user0_.STATUS as STATUS34_1_,
user0_.CUSTOMER_ID as CUSTOMER4_34_1_,
webtoolspr2_.USERID_ID as USERID1_37_0_,
webtoolspr2_.SKIN_ID as SKIN2_37_0_
from
moses.USERS user0_,
moses.WEBTOOLS_PREFERENCES webtoolspr2_
where
user0_.USER_ID=webtoolspr2_.USERID_ID(+)
and (this_.USER_NAME=? and this_.STATUS=?)

When the HibernateAuditIntegrationTest succeeds, (as in build 111), it looks like:

select
this_.USER_ID as USER1_34_1_,
this_.USER_NAME as USER2_34_1_,
this_.STATUS as STATUS34_1_,
this_.CUSTOMER_ID as CUSTOMER4_34_1_,
webtoolspr2_.USERID_ID as USERID1_37_0_,
webtoolspr2_.SKIN_ID as SKIN2_37_0_
from
moses.USERS this_,
moses.WEBTOOLS_PREFERENCES webtoolspr2_
where
this_.USER_ID=webtoolspr2_.USERID_ID(+)
and (this_.USER_NAME=? and this_.STATUS=?)


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

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.