-->
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: HQL - subquery with update
PostPosted: Fri Feb 22, 2008 5:45 am 
Newbie

Joined: Tue Oct 30, 2007 5:41 am
Posts: 2
I get a NullPointer exception for the following HQL statement:
Code:
update BI$pricing p set p.isDeleted = 'P' where p.id in
  (select p.id from BI$pricing p join p.folder f
   where f.contextId = :folderBoId
     and p.contextId = :pricingBoId
     and p.isDeleted = 'N'
     and f.isDeleted = 'N')

Is this not supported in hibernate 3.2.2?

regards


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 7:20 am 
Newbie

Joined: Fri Feb 22, 2008 4:54 am
Posts: 1
I will suggest providing error stack trace and piece of code executing this HQL to the forum.

Just a few wild guesses:
1. UPDATE HQL should be executed with Query.executeUpdate() method. Verify if you are doing the same.
2. Use a different alias in subquery to refer 'BI$pricing' entity to make it different from that used in parent query for example say 'q' instead of 'p'.


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.