Hi all,
Me again.
Since I switched to AgRest 5.x, everything works fine, except one backward compatibility, I suppose.
I had query expressions filtering on a relationship ID that does not work anymore.
Example:
entity0 (ID, entity1_id)
entity1 (ID, attr1)
The generated query (Oracle - JDBC adapter) is incorrect, something like:
select distinct t0.*
from entity0 t0
join entity1 t1 on t0.entity1_id =
t1.id
The where clause on ID is applied to t0, not t1.
If I changed the expression to attr1 of entity1, it works as expected.
Same thing happens on other entities, even going through M-to-N relationships:
entity0 (ID)
entity1 (entity0_id, entity2_id)
entity2 (ID)
would result in
select distinct t0.*
from entity0 t0
join entity1 t1 on t0.entity1_id =
t1.id join entity2 t2 on
t2.id = t1.entity2_id
This would however work fine:
exp = entity1s.entity2_id in (1,2,3)
would result in
select distinct t0.*
from entity0 t0
join entity1 t1 on t0.entity1_id =
t1.id where t1.entity2_id in (1,2,3)
Any insight?
Thanks a lot
Anthonin