When to use explicit joins instead of path traversal?

325 views
Skip to first unread message

Michael Tontchev

unread,
Apr 29, 2015, 4:25:15 PM4/29/15
to quer...@googlegroups.com
Why not do query.from(user).where(user.location.name.eq("something")) instead of using explicit joins?

Thanks!

Timo Westkämper

unread,
Apr 29, 2015, 4:34:59 PM4/29/15
to Querydsl on behalf of Michael Tontchev
For example when you want to reuse joins or use other join types beside inner join

On Wed, Apr 29, 2015 at 11:25 PM, Michael Tontchev via Querydsl <querydsl+APn2wQeUt6jEuBVj9FETOEr...@googlegroups.com> wrote:
Why not do query.from(user).where(user.location.name.eq("something")) instead of using explicit joins?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Querydsl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to querydsl+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Tontchev

unread,
Apr 29, 2015, 5:46:50 PM4/29/15
to quer...@googlegroups.com
When using a domain model that only has non-null object references and non-join columns, you wouldn't really need anything other than inner joins, would you?


On Wednesday, April 29, 2015 at 4:34:59 PM UTC-4, timowest wrote:
For example when you want to reuse joins or use other join types beside inner join

Timo Westkämper

unread,
Apr 30, 2015, 4:27:38 AM4/30/15
to Querydsl on behalf of Michael Tontchev
If you don't need to reuse the joins, you can use implicit joins then.

On Thu, Apr 30, 2015 at 12:46 AM, Michael Tontchev via Querydsl <querydsl+APn2wQeUt6jEuBVj9FETOEr...@googlegroups.com> wrote:
When using a domain model that only has non-null object references and non-join columns, you wouldn't really need anything other than inner joins, would you?

On Wednesday, April 29, 2015 at 4:34:59 PM UTC-4, timowest wrote:
For example when you want to reuse joins or use other join types beside inner join

On Wed, Apr 29, 2015 at 11:25 PM, Michael Tontchev via Querydsl <querydsl+APn2wQeUt6jEuBVj9FETOEr...@googlegroups.com> wrote:
Why not do query.from(user).where(user.location.name.eq("something")) instead of using explicit joins?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Querydsl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to querydsl+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages