On Dec 28, 12:07 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Dec 28, 2011, at 11:34 AM, Kent wrote:
Was it your intention to no longer allow this type of query().get()?
session.query(cls.orderid).get(orderid)
it was ! yes.
I get InvalidRequestError: get() can only be
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