Using CakePHP 1.1.7.3363,
i have a problem.

I have this situation:
--------------------------------------------------------------------------
//Table
CREATE TABLE  `caketest`.`nulltests` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `campo` varchar(63) default NULL,
  PRIMARY KEY  (`id`)
);

// Model
class Nulltest extends AppModel
{
var $name = 'Nulltest';
}

// Controller
class NulltestsController extends AppController
{
var $name = 'Nulltests';
var $scaffold;
}
--------------------------------------------------------------------------

If i create a new record by "nulltests/add" and i leave blank the input
box 'campo' , in table there is a record (1,null), and it's ok
But, if i edit this record by "nulltests/edit/1" and i leave empty the
input box 'campo' , in table the record now is (1,'') and it's not ok.
I don't want a empty string but a null value.
The problem is greater if the field 'campo' is datetime. An assignement
campo = '' will produce an error!!

Any solutions?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to