I created a Boolean attribute for an Oracle table that checks if an address is the customer's current address.
@is_current_address.expression def is_current_address(cls): return and_(cls.eff_date <= func.current_date(), cls.term_date >= func.current_date()) When I try to run a query with this it generates the following where clause: WHERE (addresses.eff_date <= CURRENT_DATE AND addresses.term_date >= CURRENT_DATE) = 1 and generates the Oracle error: ORA-00933: SQL command not properly ended > > I believe this type of expression isn't supported in Oracle, however manually removing the "= 1" from the clause makes the query work. Is there a different approach I need to take to make sure this is handled properly? -- 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 post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.