Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
saveAll - fieldList question
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Raph  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 10:15
From: Raph <ra...@epoczta.pl>
Date: Thu, 5 Nov 2009 02:15:24 -0800 (PST)
Local: Thurs 5 Nov 2009 10:15
Subject: saveAll - fieldList question
Hello,

Let's say I have a model Model1 with fields 'name' and 'date' and I
have a Model2 with field 'name'. Model1 is in relation 'hasMany' with
Model2. How should I use saveAll() method with "fieldList" parameter
if I only want to save all 'date' from Model1 and 'name' from Model2?
It looks like in "fieldList" array only fields' names without models'
names allowed i.e.

This will work:
$this->saveAll($data, array('fieldList' => array('date')));

but this won't:
$this->saveAll($data, array('fieldList' => array('date',
'Model2.0.name')));

this won't either:
$this->saveAll($data, array('fieldList' => array('date',
'Model2.name')));

Any suggestions?

--
Raph


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mattalexx  
View profile   Translate to Translated (View Original)
 More options 13 Nov, 13:52
From: mattalexx <mattal...@gmail.com>
Date: Fri, 13 Nov 2009 05:52:48 -0800 (PST)
Local: Fri 13 Nov 2009 13:52
Subject: Re: saveAll - fieldList question
Any luck figuring this one out?

On Nov 5, 3:15 am, Raph <ra...@epoczta.pl> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Roda  
View profile   Translate to Translated (View Original)
 More options 13 Nov, 22:47
From: David Roda <davidcr...@gmail.com>
Date: Fri, 13 Nov 2009 17:47:16 -0500
Local: Fri 13 Nov 2009 22:47
Subject: Re: saveAll - fieldList question

I would probably split it into two calls

assuming this code is in your Model1 model:

$this->saveAll($data['Model1'], array('fieldList' => array('date')));
$this->Model2->saveAll($data['Model2'], array('fieldList' =>
array('date')));


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Raph  
View profile   Translate to Translated (View Original)
 More options 30 Nov, 21:05
From: Raph <ra...@epoczta.pl>
Date: Mon, 30 Nov 2009 13:05:53 -0800 (PST)
Local: Mon 30 Nov 2009 21:05
Subject: Re: saveAll - fieldList question
Well, It's not very elegant solution and I need to make those inserts
in one transaction.

On 13 Lis, 23:47, David Roda <davidcr...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrzejborkowski@gmail.co m  
View profile   Translate to Translated (View Original)
 More options 1 Dec, 08:07
From: "andrzejborkow...@gmail.com" <andrzejborkow...@gmail.com>
Date: Tue, 1 Dec 2009 00:07:27 -0800 (PST)
Local: Tues 1 Dec 2009 08:07
Subject: Re: saveAll - fieldList question
i have the same problem lok at api i think this havent solution now..

On 30 Lis, 22:05, Raph <ra...@epoczta.pl> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google