I'm not trying the trunk, and it's the first time I use filter_by, but I
guess:

MappedClass.query().filter_by( MappedClass.column_name == 'Foo' )

equates to filter_by(False), because the .c is missing and it's
comparing an UOWProperty to a string, instead of a Column object to a string

Actually, in my case it gives me

MappedClass.column_name < 'foo' == True

and

MappedClass.column_name > 'foo' == False



In SA 0.3.6, the query runs and returns all rows, possibly spoiling
"something",  "somewhere"

If we do the same with MappedClass.select(MappedClass.column_name=='Foo')

it raises AttributeError: 'bool' object has no attribute 'get_children'

which, if not really explicit, let us know where to look

Since instrumented attributes cannot be used in filter_by and friends
(http://www.mail-archive.com/[EMAIL PROTECTED]/msg03470.html)
can an exception be raised?

tnx


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to