Sqlalchemy duplicated WHERE clause to FROM

前端 未结 1 1956
终归单人心
终归单人心 2021-01-27 03:16

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 &&am         


        
相关标签:
1条回答
  • 2021-01-27 03:34

    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.

    0 讨论(0)
提交回复
热议问题