[Dbix-class] Bug: ->single on set with single row containing single NULL column

Peter Rabbitson rabbit+dbic at rabbit.us
Sat Dec 19 09:14:18 GMT 2009


tirveni yadav wrote:
> 
> Mail Forwaded :::
> 
> The behaviour of ResultSet->single seems to have changed sometime
> between 0.08103 and 0.08112.  In 0.08112, if you perform a query of the
> form:
> 
> $schema->resultset('Foo')
>  ->search(..., {select=>[{sum=>...}], as=>[...]})
>    ->single
> 
> AND the query returns only one row
> 
> AND the row contains only one column whose value is NULL
> 
> then the single fails to inflate the result and subsequent accesses to
> the putatively inflated result fail with an access to an undefined
> value. The same construct used to work fine in 0.08103.

Bug confirmed. Fix is not trivial, but should get into trunk before xmas.



More information about the DBIx-Class mailing list