serg
serg

Reputation: 1023

Migration from toplink/eclipselink equalOuterJoin to Hibernate Criteria

I am migrating really old application from toplink to the Hibernate. An i have the folowing code:

ExpressionBuilder expHVLMAVI  ...

expHVLMAVI.anyOfAllowingNone(perf2CollectionString).get("bereichsCode")
.equalOuterJoin(bereichsCode)

Any ideas how to migrate it to the Hibernate Criteria API? I am no idea what happens in this line (Any explanation will be appreciated)

Upvotes: 0

Views: 327

Answers (1)

Chris
Chris

Reputation: 21145

expHVLMAVI likely represents a class/entity in your model, so anyOfAllowingNone is an outerjoin over the perf2CollectionString relationship, and then a join over the bereichsCode relationship. This is just part of an expression to be used in the rest of the query.

In JPQL, this would be equavlent to something like:

"Select... from ExpHVLMAVI expHVLMAVI left outer join expHVLMAVI.perf2CollectionString as perf2CollectionString join perf2CollectionString.bereichsCode as bereichsCode"

What you do with the bereichsCode declaration is then up to you.

Upvotes: 1

Related Questions