[html-formfu] Model::DBIC inserts empty strings instead of NULL values

Peter Shangov pshangov at yahoo.com
Thu Apr 28 12:09:17 GMT 2011


Hi Dmitry,

This is a known issue, I wrote about it recently too:
http://lists.scsys.co.uk/pipermail/html-formfu/2011-April/003086.html (see #3)

Carl (FormFu author) has not been active on the mailing list over the last couple of weeks. Any bug fixes or improvements to H:FF:M:DBIC need to be approved and tested by him, so at this point you could either make your own fork and use that temporarily, or wait for whenever he has time to look into this issue.

Regards,

--
Peter

--- On Thu, 28/4/11, Dmitry Bigunyak <icestar at inbox.ru> wrote:

> From: Dmitry Bigunyak <icestar at inbox.ru>
> Subject: Re: [html-formfu] Model::DBIC inserts empty strings instead of NULL values
> To: html-formfu at lists.scsys.co.uk
> Date: Thursday, 28 April, 2011, 12:39
> Does anybody read this mailing-list?
> Maybe someone has the same problem or knows how to solve
> it?
> Any suggestions are appreciated.
> 
> 22.04.2011 01:41, Dmitry Bigunyak пишет:
> > Hello!
> > I faced with this problem after upgraded from version
> HTML-FormFu-Model-DBIC-0.06000 to the next one.
> > 
> > In version 0.06000 if I had a table with varchar
> column and is_nullable option was set I got NULL values
> inserted for it on submit. In my example I have a column
> 'username' with UNIQUE constraint for it.
> > The next release-0.08002 broke my application. In that
> release author made a bugfix:
> > 
> > ' - Fix: Was trying to pass undef to NOT NULL columns
> - changed check from ( $is_nullable || ... ) to (
> $is_nullable && ... ) appears to have been
> unintentionally changed in svn r93 when the code was a part
> of DBIx::Class::HTML::FormFu.'
> > 
> > Instead of NULL values the module started insert empty
> strings and I got a lot of "Duplicate entry '' for key"
> errors. So, I posted a bug report to the CPAN bug tracker
> and had to downgrade.
> > 
> > Today the last release version is 0.09000, but I still
> can't upgrade. I thought about using ignore_if_empty option,
> but I lose ability to unset the column value to NULL with
> it.
> > 
> > Can someone suggest me the way to solve this problem.
> > Thanks
> 
> -- Dmitry Bigunyak
> e-mail: icestar at inbox.ru
> 
> 
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
> 



More information about the HTML-FormFu mailing list