Priyank Doshi
Priyank Doshi

Reputation: 13161

what is Difference between JPQL 2.1 's ON and Hibernate's WITH clause

According to early draft version of JPA 2.1 : https://blogs.oracle.com/arungupta/entry/jpa_2_1_early_draft , It will include support for ON keyword in JPQL. In hibernate we already have WITH clause which does similar kind of job.

My question is would these two be the same or there are any differences?

Upvotes: 2

Views: 634

Answers (1)

spiritwalker
spiritwalker

Reputation: 2257

based on what I understand, "with" is just the replacement of "on" in hibernate. And the thing is hibernate does not even support "on" keyword in left join query. So I think it is safe to say that hibernate "with" keyword is equivalent to SQL "on" keyword.

Upvotes: 1

Related Questions