Hi all for my first post I'm using the new one() method like this: query(Table).filter_by(and_(Table.c.field1 == val1, Table.c.field2 == val2)).one()
filed1 + field2 has a unique constraint in Table, so there won't never be more than one row returned, but there may be none. When there's none I get an InvalidRequestError, would'nt it be better to return something else (None ?) or am i missing something ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
