[Dbix-class] Enforcement of just one returned row from ->single?

Thomas Sibley trsibley at uw.edu
Wed Jul 26 16:06:12 GMT 2017


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


More information about the DBIx-Class mailing list