Re:Avoid Null Checks by Replacing Finders with Tellers
by tbrownaw on Monday June 17, 2013 @04:17PM
(#5895662)
There's also the case where I forget a unique index or get the query wrong, and get several records when I'm only expecting one.
[ Parent
| on HN ]
Re:Avoid Null Checks by Replacing Finders with Tellers
by dragonwriter on Monday June 17, 2013 @04:22PM
(#5895692)
The teller strategy can work for those; that's all checking that can be done in the teller (or, in the case of teller-implemented-on-top-of-finder) in the finder. There's no reason to repeat the logic checking for this case all over the application.