Re: Model question v1.2

2007-09-10 Thread Chris Hartjes
On 9/10/07, Troy Gilbert <[EMAIL PROTECTED]> wrote: > > Am I correct in my thinking that the reason data is returned this way > is for the scenario where a model has an association, e.g. if post had > a user: > > Array > ( > [Post] => Array ( [field1] => 'value', [field2] => 'value' ) > [U

Re: Model question v1.2

2007-09-10 Thread Troy Gilbert
> That's not a bug. Data is always returned in this format: > > Array > ( > [ModelName] => Array > ( > [fieldname1] => 'value' > [fieldname2] => 'value' > ) > ) Am I correct in my thinking that the reason data is returned this way is for the scenario w

Re: Model question v1.2

2007-09-07 Thread Chris Hartjes
On 9/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > If I use $this->set('post',$this->Post->read()); in the controller > > Why do I have to access it like this in the view: > > echo $post['Post']['id']; > > Shouldn't the proper way be echo $post['id']; > > Is this a bug? Has the spec chang

Model question v1.2

2007-09-07 Thread [EMAIL PROTECTED]
If I use $this->set('post',$this->Post->read()); in the controller Why do I have to access it like this in the view: echo $post['Post']['id']; Shouldn't the proper way be echo $post['id']; Is this a bug? Has the spec changed in 1.2? I went through the code for the read() function in /cake/libs