Sqlalchemy Duplicated Where Clause To From
I wrote raw query to psql and it's work fine but when i wrote this in sqlalchemy my WHERE clause duplicated to FROM clause. select id from T1 where arr && array(select l.id
Solution 1:
I find solution!
func.array(select([T2.id]).where(T2.box.op('&&')(box)).as_scalar())
After added as_scalar() all be good, beacause in my select all ids need have in one array.
Post a Comment for "Sqlalchemy Duplicated Where Clause To From"