in fact, I modified our Query class after .first() was being abused
out of laziness:

    def first(self):
        raise ProgrammingError("Never use .first(); please use .get()
or .one()\n"
            "  .one() makes sure there is only one return and .get()
returns None if doesn't exist.\n"
            "  .get() is probably better since it avoids database
roundtrip when the object is already loaded.")

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to