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: Delete Query
PostPosted: Tue Aug 22, 2006 1:32 am 
Newbie

Joined: Tue Aug 22, 2006 1:24 am
Posts: 1
Hi i am trying to delete record from the table. The query i am passing to createQuery is...

DELETE from T_Appl_Acct_Grp_Dtl where ( group_Id = 1 and role_Code = 'HSP' and level1 = '0041' and level2 is null and level3 is null and level4 is null) OR (group_Id = 1 and role_Code = 'HSP' and level1 = '0041' and level2 = '34545' and level3 = '35345' and level4 is null)

after executing the query. The hibernate generated the query like this...

delete from RA00.T_APPL_ACCT_GRP_DTL where GROUP_ID=1 and ROLE_CODE='HSP' and LEVEL1='0041' and (LEVEL2 is null) and (LEVEL3 is null) and (LEVEL4 is null) or GROUP_ID=1 and ROLE_CODE='HSP' and LEVEL1='0041' and LEVEL2='34545' and LEVEL3='35345' and (LEVEL4 is null)

The brackets are miss placed and this cause some proplem while deleteing the records from the table.


can any one help me in this please...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 22, 2006 1:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
what version of hibernate ?

if not latest 3.1.x or 3.2.x then please verify against such version and if the problem persists then submit a runnable failing testcase to jira.

_________________
Max
Don't forget to rate


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.