Forums Register Login

Theta-style joins in Criteria

+Pie Number of slices to send: Send
Hi,

I am convering all my queries to Criteria but have come across a query that includes a Theta-style join. The book i have been using says these are currently not available within the criteria API, is this true?

I have been searching for a while and have not come up with anything to disprove this, was wondering whether anyone had found a way around this?

Thank you,

John
+Pie Number of slices to send: Send
Well Theta style joins are just where the relationship of keys is typed in the Where clause, and does not necessarily use PKs and FKs.

The Criteria object starts with just one object type, then to add a join, you use addAlias(), so the "Join" statement is created by Hibernate, so you never get to do a theta style join. That is why they aren't supported, because you can't just add a table to the From clause, and add Where clauses to the two tables. Does that make sense?

Mark
Every plan is a little cooler if you have a blimp. And a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2829 times.
Similar Threads
Wednesday Evening Physics
Theta Join
hibernate migration
How to do inner join while working with set in Hibernate
how to use variable with oracle like
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:50:04.