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