Skip Menu |

This queue is for tickets about the HTML-FormFu-Model-DBIC CPAN distribution.

Report information
The Basics
Id: 61790
Status: resolved
Priority: 0/
Queue: HTML-FormFu-Model-DBIC

People
Owner: Nobody in particular
Requestors: icestar [...] inbox.ru
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.08002
Fixed in: (no value)



Subject: Insert NULL values
Hello! After upgrade from 0.06000 version to 0.08002 filling of the same form starts generate INSERT statement with empty strings instead of NULL values. The columns are defined as is_nullable => 1.
What is the column-type? We only try setting NULL if the column's "data_type" matches this regular expression: m/^timestamp|date|int|float|numeric/i
From: icestar [...] inbox.ru
On Fri Nov 26 06:58:07 2010, CFRANKS wrote: Show quoted text
> What is the column-type? > > We only try setting NULL if the column's "data_type" matches this > regular expression: > m/^timestamp|date|int|float|numeric/i >
In my database schema file I have the next column description: 'username' => { data_type => 'varchar', size => 255, is_nullable => 1, }, So, the column type is 'varchar'. Also I have an unique constraint for that column. __PACKAGE__->add_unique_constraint( 'username' => [qw/ username /] ); And of course I can't insert two rows with empty username value, I get "Duplicate entry '' for key". The worst thing is that it worked in the 0.06 version. And after upgrade I got a lot of errors because of that.
From: icestar [...] inbox.ru
Sorry. But is anybody going to fix this bug, it's really important.
From: icestar [...] inbox.ru
On Fri Mar 11 04:44:28 2011, Alien wrote: Show quoted text
> Sorry. But is anybody going to fix this bug, it's really important.
This bug blocks the update to HTML-FormFu-0.08002 version.
I imagine this is too late for your needs - but this can be resolved by setting $field->model_config->{null_if_empty} = 1