Hi Tilen, thanks for your effort.
Sadly your solution doesn't work

i ended up modifying dbo_source's function "boolean" from

public function boolean($data, $quote = false) {
        if ($quote) {
                return !empty($data) ? '1' : '0';
        }
        return !empty($data);
}

to

public function boolean($data, $quote = false) {
        return !empty($data) ? '1' : '0';
}

Any dev can confirm this modify wouldn't break anything? :D

On 9 Mag, 15:34, Tilen Majerle <[email protected]> wrote:
> check thishttp://book.cakephp.org/view/1402/options-default
>
> <http://book.cakephp.org/view/1402/options-default>and 
> thishttp://book.cakephp.org/view/1405/options-empty
> --
> Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> 2011/5/9 Ernesto <[email protected]>
>
>
>
> > Hello.
>
> > when the bool field is FALSE Cake reads that value as "" (empty
> > value).
>
> > this is causing some troubles in my newest app, where due to
> > customer's habits i'm using boolean selects (simple select boxes with
> > "Yes" ans "No" options) instead of checkboxes.
>
> > my select boxes' options are defined this way:
> > array(0 => "No", 1 => "Yes")
>
> > is there any way to change the default false boolean value to
> > "0" (zero) ??
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > [email protected] For more options, visit this group
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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