[Dbix-class] numeric fields and null content
eco at ecocode.net
Mon Jun 16 07:35:04 GMT 2014
On 13 Jun 2014, at 12:31, Peter Rabbitson <rabbit+dbic at rabbit.us> wrote:
> No you aren't. It is in fact a bug. Could you please write me a test that shows the issue?
Yes I was! I pushed the undef into a wxPerl widget which, when retrieved, returned ''. So when pushing into the DBIx::Class::Row field, I didn’t put undef but ''. So when _eq_column_values was called it executed a numeric comparison which of course fails with ‘’.
The only (documented) issue that could be checked in DBIx::Class is to not allow '' (or any other string) when 'is_numeric' is true ?
More information about the DBIx-Class