'Hibernate generating Oracle queries with "(+)" operator instead join
I have to do some improvements to a legacy project using Hibernate 5.0.9 with Oracle database. I noticed that hibernate are generating queries like that
select a.id, b.id
from a, b
where a.b_id = b.id(+)
instead of
select a.id, b.id
from a left join b on a.b_id = b.id
for a code like this
Criteria criteria = session.createCriteria(A.class, "a");
criteria.createAlias("a.b", "b", JoinType.LEFT_OUTER_JOIN);
criteria = criteria.setProjection(
Projections.projectionList()
.add(Projections.property("a.id"))
.add(Projections.property("b.id"))
);
criteria.list();
At least for me, the "(+)" is complicated to read. In other project with same Hibernate version, the "joins" are generated normally.
Is this a Hibernate configuration?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
