keredson / peewee

a small, expressive orm -- supports postgresql, mysql and sqlite
http://docs.peewee-orm.com/
MIT License
13 stars 4 forks source link

bring select.get() into parity with model.get() #3

Open keredson opened 8 years ago

keredson commented 8 years ago

currently this is allowed:

u = User.get(User.id==1)

and this is allowed

u = User.select().where(User.id==1).get()

but this is not:

u = User.select().get(User.id==1)

impl the last option. (ie make it identical to the middle option just like the first option is)

keredson commented 8 years ago

see also https://github.com/coleifer/peewee/issues/993