I am porting a 1.2.0.5875 app to 1.3 in preparation for moving to 2.X. I 
have several fields (tax, amount, fee) in an order record all with NULL set 
to "No", each is a decimal(6,2) field, and each has default value of 0.00

The following code worked fine and dandy in the 1.2 system and in the event 
nothing was specified by the user for tax, amount, or fee, they were 
properly set to 0.00 in the DB:

$this->cleanUpFields();
$this->Order->create();
if ($this->Order->save($this->data)) {

In my 1.3 migration build I am getting 'tax' cannot be NULL and I see in 
the SQL insert op that indeed it is being set to NULL, and thus MySQL 
chokes on it.

Why did it operate correctly in the old 1.2 system and what should I do to 
correct this? It is pervasive across numerous classes and I want to get it 
right the first time.

Is this perhaps a difference in the way the form helper is handling 
initialization of the fields? Or somewhere in the model? I did not need to 
specify validation for these fields as used back in 1.2 etc.

Thanks in advance!

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Reply via email to