Re: saveAll() with $fieldList problem

2010-04-23 Thread marco.rizze...@gmail.com
I try this : $this->ModelA->saveAll($this- >data,array('fieldList'=>array('ModelA.field_name','ModelB.field_name'))); But it doesn't work (I use cakephp 1.2) On 21 Apr, 15:45, Jeremy Burns wrote: > Prefix all of your fields with the model name (it's good practice everywhere > really). So Model

Re: saveAll() with $fieldList problem

2010-04-21 Thread Jeremy Burns
Prefix all of your fields with the model name (it's good practice everywhere really). So ModelA.field_name, ModelB.field_name etc. Jeremy Burns jeremybu...@me.com On 21 Apr 2010, at 14:40, marco.rizze...@gmail.com wrote: > I want use Model->saveAll() with fieldList to avoid to save some > field

saveAll() with $fieldList problem

2010-04-21 Thread marco.rizze...@gmail.com
I want use Model->saveAll() with fieldList to avoid to save some field My problem is that I have in the related model two fields with the same name but one field (of first model (ModelA) ) should be saved and the other (of second model(ModelB)) shouldn't be save. How do I set the fieldList in save

Re: saveAll() with $fieldList problem

2009-08-18 Thread MrMistral
Hi, after some trial-and-error I found the solution (and simple of course ... why did I spend so much time on that?!): fields in fieldList must not contain the modelname (i.e. not "model.field") but just the fieldnames of the models to be saved. So in your case, jakobjp, your fieldList-Array shoul

Re: saveAll() with $fieldList problem

2009-08-03 Thread solitud
Hi jakobjp, I have exact the same problem. Did you found a solution? On 13 Jul., 11:50, jakobjp wrote: > Hi Joshua. > > Thanks for your response, but unfortunately you misunderstood the > issue. > > I am NOT asking for the format of the $data array, but the $fieldList > (an option that can be pa

Re: saveAll() with $fieldList problem

2009-07-13 Thread jakobjp
Hi Joshua. Thanks for your response, but unfortunately you misunderstood the issue. I am NOT asking for the format of the $data array, but the $fieldList (an option that can be passed on to the saveAll() function). According to the CakePHP docs (your link): "If $fieldList is not supplied, a mal

Re: saveAll() with $fieldList problem

2009-07-12 Thread joshua
> > Take a look at the chapter ' 3.7.4 Saving Your > Data' > in cakebook. Array ( [Article] => Array ( [title] => My first article ) [Comment] => Array ( [0

saveAll() with $fieldList problem

2009-07-12 Thread jakobjp
I cannot get the $fieldList to work for Model->saveAll() not matter what I try. How should the $fieldList array be formatted when storing a Model plus associated Models via saveAll()? My example: Form fields: User.first_name User.last_name Address.street Address.city ... The two models User an