Enforcement of just one returned row from ->single?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Enforcement of just one returned row from ->single?

Thomas Sibley
Is there any interest in having ->single (and presumably ->find) more strongly enforce the query returning just one row?  Currently it warns, but proceeds to return the first row.  I’d like it to throw an exception instead of merely warning, perhaps as an option that’s available during some transition period.

I know there are numerous other approaches to making this behaviour work for myself, but I’m curious if there’s wider support for fully deprecating ->single working on a resultset that matches more than one row.

Thomas
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@...
Loading...