teknoid wrote:
> That being said it is always a good idea to name your fields as
> ModelName.fieldName and ModelName.{$index}.fieldName
> This is especially true when using saveAll(), and I do specify that in
> the tutorials.
Yep, you're right. I usually do it that way when handling hasMany
relationships
But with
$this->data = $this->Contact->find('all', array(
'conditions' => array(
'Contact.user_id' => $this->Session->read('Auth.User.id')
));
I get the data formatted as {$index}.ModelName.fieldName
What find syntax would you use to get the data in the proper way?
Btw:
I did a workaround to change the array keys ($key = $key +1) so the keys
start with "1" rather than with "0".
Now it works, even with saveAll().
But that doesn't seem the proper way of the cake... ;-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---