-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jody Belka wrote:
| On Tue, Oct 05, 2004 at 12:47:44PM +0200, Markus Spring wrote:
|> The header information for the request is:
|>
|> http://beer.local/beer//beer/do_edit/
|>
|> POST /beer//beer/do_edit/ HTTP/1.1
|> Content-Type: application/x-www-form-urlencoded
|> Content-Length: 82
|>
action=create&name=Helles&brewery=2&style=&price=&score=&abv=¬es=&create=create
|>
|> So at the moment I am stuck: I browsed Class::DBI::FromCGI and
|> CGI::Untaint, but
|> found no line which could be hold responsible for creating an empty string
|> instead of undef for missing data.
|
| hmm, not sure how to make this work sensibly with integer fields off the top of
| my head, but it's absolutely correct to be creating an empty string instead of
| undef.
|
| the reasoning for this, is that the field is included as part of the request,
| so it's not missing, but has been supplied as an empty value. if
| "existing but empty" is taken as undef then there is no way to clear out a
| field in an existing text record.
As far as I remember, this was added after someone on this list mentioned the
impossibility of deleting values in a record.
So the mechanism is correct. Could it be that MySQL resp. DBD::mysql accepts an
empty string for integer fields, too?
| so, i'd say the actual problem isn't the emtpy string, because that is
| necessary, but that with integer fields it isn't converted to a null value,
| where allowed. i guess what is really needed is a way to indicate that for
| particular field types empty is translated into null (possibly everything but
| text?)
On what level this has to be handled? Class::DBI? or Maypole::Model::CDBI?
Kind regards
Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBYpgnxxUzQSse11ARAvxKAJsHfVjLEARxxuLOhQhcxyueGyCRCACfYyt4
sNOeFh5j1tTwAA97SEYPzV4=
=j8zP
-----END PGP SIGNATURE-----
_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:56 GMT