i knew it^^
On 29 Okt., 13:58, Caroline wrote:
> ok, I am an idiot...
> After hours of debugging, I found the code where I, myself, unset the
> field if it is empty.
> Sorry about the waste of time and thanks for the help.
>
> On Oct 29, 9:05 pm, euromark wrote:
>
> > i still dont get why $objec
ok, I am an idiot...
After hours of debugging, I found the code where I, myself, unset the
field if it is empty.
Sorry about the waste of time and thanks for the help.
On Oct 29, 9:05 pm, euromark wrote:
> i still dont get why $object['Taxcode']['description'] = '' should be
> ignored
> in my cas
i still dont get why $object['Taxcode']['description'] = '' should be
ignored
in my case it always sets the field to empty in the database
what you are doing is exactly what happens if you use edit and empty a
field.
sure there is no callback, no whitelisting involved?
On 29 Okt., 04:27, Carolin
Thanks for that, unfortunately, not luck with allowEmpty.
I am going to report a bug and see what happens.
On Oct 29, 11:40 am, cricket wrote:
> On Thu, Oct 28, 2010 at 8:41 PM, Caroline wrote:
> > sorry, not sure I follow. How?
> > Because if the field is blank, Cake does not insert NULL, it ju
On Thu, Oct 28, 2010 at 8:41 PM, Caroline wrote:
> sorry, not sure I follow. How?
> Because if the field is blank, Cake does not insert NULL, it just
> ignore the field.
My bad. I forgot we were talking about an update. So, if the column
was defined to be DEFAULT NULL, and the user deletes the de
sorry, not sure I follow. How?
Because if the field is blank, Cake does not insert NULL, it just
ignore the field.
I would have to explicitly write
If ($data['Taxcode']['description']=='') $data['Taxcode']
['description'] = null;
before calling the save method.
I know I can use beforeSave and other
On Thu, Oct 28, 2010 at 7:50 PM, Caroline wrote:
> sorry I meant every time I need to update, like if description is
> blank then insert null.
Well, there you go--Cake does that for you ;-)
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related que
sorry I meant every time I need to update, like if description is
blank then insert null.
On Oct 29, 9:42 am, Caroline wrote:
> Ok, fair enough, wrong example. Thanks for the tip, though.
> In my previous post, please replace the code by this (same outputs):
>
> $object = array();
Ok, fair enough, wrong example. Thanks for the tip, though.
In my previous post, please replace the code by this (same outputs):
$object = array();
$object['Taxcode']['id'] = '63ae4d63efeecf1655e9b948fdc114a8';
$object['Taxcode']['description'] = '';
On Thu, Oct 28, 2010 at 5:38 PM, Caroline wrote:
> This is the code I run:
> $object = array();
> $object['Taxcode']['id'] = '63ae4d63efeecf1655e9b948fdc114a8';
> $object['Taxcode']['acctaxcollected_id'] = '';
> $object['Taxcode']['acctax
This is the code I run:
$object = array();
$object['Taxcode']['id'] = '63ae4d63efeecf1655e9b948fdc114a8';
$object['Taxcode']['acctaxcollected_id'] = '';
$object['Taxcode']['acctaxpaid_id'] = '';
$this->Taxcode->save($ob
please post your sql debug output (the produced queries)
On 28 Okt., 12:52, Caroline wrote:
> Thanks for your replies.
> Yes I might try to file it in trac, like you suggest, Cricket.
>
> Euromark, yes my field is varchar NOT NULL and I don't think I have a
> bug because it is a pretty straight
Thanks for your replies.
Yes I might try to file it in trac, like you suggest, Cricket.
Euromark, yes my field is varchar NOT NULL and I don't think I have a
bug because it is a pretty straight forward operation. Only when the
field is blank, it seems to be ignored. If you don't have the problem,
must be a bug on your side
i can always empty my fields this way!
is your field set to varchar(x) NOT NULL?
On 28 Okt., 05:40, cricket wrote:
> On Wed, Oct 27, 2010 at 8:00 PM, Caroline wrote:
> > Hi,
> > I am trying to update a field to an empty string in my DB. Sounds
> > simple and I cannot f
On Wed, Oct 27, 2010 at 8:00 PM, Caroline wrote:
> Hi,
> I am trying to update a field to an empty string in my DB. Sounds
> simple and I cannot find anybody else with the problem so I am
> thinking I must be doing something really wrong...
>
> If I have a record in the DB with some value in 'desc
Hi,
I am trying to update a field to an empty string in my DB. Sounds
simple and I cannot find anybody else with the problem so I am
thinking I must be doing something really wrong...
If I have a record in the DB with some value in 'description', for
example, and I do
$data = array('id'=>1, 'name
16 matches
Mail list logo