This is the actual code, with table names swapped out. I've confirmed that 
my_table.c.name is infact a column, and the comparison operation generates 
a BinaryExpression object as it is supposed to. The issue is that where() 
throws an exception indicating it doesn't accept BinaryExpression objects, 
even though it is supposed to. 

On Friday, February 14, 2020 at 5:16:40 AM UTC-5, Simon King wrote:
>
> Can you show the real code that runs the query? I'm wondering whether 
> the thing that you are comparing against my_table.c.name is not 
> actually a simple string. 
>
> Simon 
>
> On Wed, Feb 12, 2020 at 11:01 PM Mark Wilkins <cont...@markwilkins.dev 
> <javascript:>> wrote: 
> > 
> > Some additional code incase its relevent: 
> > 
> >     # Get DB connection 
> >     engine = setup_env_db_engine(debug=True) 
> >     connection = engine.connect() 
> > 
> >     # Configure SQLalchemy 
> >     meta = MetaData(bind=engine) 
> >     meta.reflect() 
> > 
> >     my_table = meta.tables.get('my_table') 
> > 
> > 
> > -- 
> > SQLAlchemy - 
> > The Python SQL Toolkit and Object Relational Mapper 
> > 
> > http://www.sqlalchemy.org/ 
> > 
> > To post example code, please provide an MCVE: Minimal, Complete, and 
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full 
> description. 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups "sqlalchemy" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sqlal...@googlegroups.com <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sqlalchemy/839938dd-ed33-4f55-a836-185ec0689f2f%40googlegroups.com.
>  
>
>

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/add65511-ec23-4414-a56c-910a2cc3c4ec%40googlegroups.com.

Reply via email to