Reputation: 11
I am trying to join 2 tables in flexible search query (OrderEntryItem and AbstractOrderEntry) filtering by BaseStoreModel
select {oe.pk} from {OrderEntryItem as oe join AbstractOrderEntry as aoe on {oe.abstractOrderEntry} = {aoe.pk}} where {aoe.order} in (select {o.pk} from {AbstractOrder as o where {o.store} = ?store)
But i have the following error: cannot find (visible) type for alias o within [aoe:AbstractOrderEntry, oe:OrderEntryItem]
Upvotes: 0
Views: 1419
Reputation: 203
You can use EXISTS instead of IN keyword in flexi query. You can get support from this . link
If you want use "IN" keyword, you have a syntax problem. you need to use two curly braces.
For example;
SELECT {PK} FROM {Product} WHERE {code} IN ( {{ SELECT {code} FROM {Product} WHERE {unit}=unit1 }})
Upvotes: 0