You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select
this_.id as y0_
from
series this_
left outer join series_site additional3_ on
this_.id = additional3_.series_additional_sites_id
left outer join site additional1_ on
additional3_.site_id = additional1_.id
where
(this_.primary_site_id =?
or (additional1_.id =?))
But when I try to use the deeper nested level that doesn't work anymore:
def siteStoryCriteria() {
return Story.where {
series in siteSeriesCriteria().id()
}
}
list = siteStoryCriteria().id().list()
Now the join is no longer a left outer:
select
this_.id as y0_
from
story this_
where
this_.series_id in (
select
this_.id as y0_
from
series this_
inner join series_site additional3_ on
this_.id = additional3_.series_additional_sites_id
inner join site additional1_ on
additional3_.site_id = additional1_.id
where
(this_.primary_site_id =?
or (additional1_.id =?)))
I've read that join() only works on the tree root of the Criteria-tree. But how am I supposed to solve this?
I've tried to add
join("series.additionalSites", JoinType.LEFT)
to the nested criteria, but that doesn't work either. I'm stumped here...
The text was updated successfully, but these errors were encountered:
I have a complex structure which I'll simplify for this example:
I need to select all stories associated with a Site and make further more detailed selections with that.
First I select all series and that works fine using this:
That produces the intended SQL:
But when I try to use the deeper nested level that doesn't work anymore:
Now the join is no longer a left outer:
I've read that join() only works on the tree root of the Criteria-tree. But how am I supposed to solve this?
I've tried to add
join("series.additionalSites", JoinType.LEFT)
to the nested criteria, but that doesn't work either. I'm stumped here...
The text was updated successfully, but these errors were encountered: