dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 379 forks source link

Model.one() does not return error for not found #584

Closed varsis closed 9 years ago

varsis commented 9 years ago

When using Model.one() I get no error, just null error and null object back. Would be nice to have the same error output as Model.get().

dxg commented 9 years ago

This is by design. .one is merely a thin wrapper around .find which returns the first item.