find() accepts conditions that are not expressions

Bug #676751 reported by Edwin Grubbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Storm
New
Undecided
Unassigned

Bug Description

If I have a storm class with an attribute named similarly to a storm attribute, it can be fairly easy to write a bad conditional. For example:

class MyTable(Storm):
    _foo = Int()
    @property
    def foo(self):
         ...

store.find(MyTable, MyTable._foo == 9) # good query: WHERE foo=9
store.find(MyTable, MyTable.foo == 9) # bad query: WHERE FALSE

It would be nice if storm raised an exception or a warning when something that isn't a storm expression is passed in as a condition.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.