Hibernate version: 3.1.2
Background:
I have a bidirectional, non-lazy one-to-many association between two domain objects. We use Oracle10g database and have implemented optimistic locking using ORA_ROWSCN meta-column as version column in Hibernate. A bug in Oracle makes ORA_ROWSCN not to work in outer join queries.
Problem:
When fetching the object that has a set of another objects using
Code:
getHibernateTemplate().get(DomainObject1Impl.class, id);
everything goes well (the fetching is done without outer join in SQL level, two different queries gets executed). But when calling
Code:
session.refresh(domainObject1)
the refresh query contains outer join for some reason I cannot understand (only one query gets executed).
I have tried to disable the outer join by putting different combinations of fetch="select" and outer-join="false" attributes in both ends of the association, but that seems not to help.
Question:
How can I disable outer join from the refresh query?