-->
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: where clause in class mapping interferes with load()
PostPosted: Wed May 11, 2005 2:03 pm 
Newbie

Joined: Mon Jun 07, 2004 9:18 am
Posts: 13
Location: Torino, Italy
Hi,

Hibernate 3.0.3 on Oracle 8.1.7.

Code:
<class name="Offer" table="OFFERS" where="ID>0">
  ...
</class>


When doing
Code:
session.load(Offer.class, new Integer(0), LockMode.UPGRADE)

the following SQL is generated:

Hibernate: select ... from OFFERS offer0_ where offer0_.ID=? and offer0_.ID>0 for update

In Hibernate 3.0.2, and previous releases (also 2.x series) the where clause specified in the mapping did not interfere with Session.load(), and the following SQL is generated:

Hibernate: select ... from OFFERS offer0_ where offer0_.ID=? for update

Is this a regression or was it a long standing bug in previous releases ?
I rely heavily on this behavior (where clause *not* interfering), so are there other suggestions ?

Thanks,

Simon


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.