Saturday, January 31, 2009

Re: Help Cake newbie (i really want to bake succesfully)

As you're in the authors view, I'll assume that you're trying to
retrieve associated Books for Author. If you post the contents of your
view action, as well as the $hasMany and $belongsTo arrays for Author
and Book respectively, I'm sure someone can help you sort it out.

Also, if you're using $this->Author->paginate() instead of find(),
post your controller's $paginate array.

On Sat, Jan 31, 2009 at 8:48 PM, CP <indie@leatherbelts.com> wrote:
>
> I followed this artciel http://www.packtpub.com/article/working-with-simple-associations-using-cakephp
>
> But when was unable to get everything working correctly.
> I got everything working up to a point but at this point "Retrieving
> Related Model Data in One-To-Many Relation" is where I started having
> problems.
>
> the error I am getting is below:
>
> Notice (8): Undefined index: Book [APP/views/authors/index.ctp, line
> 1]
>
> Anyone have any suggestions? Perhaps I have created the foreign key
> incorrectly? I have been trying to figure it out for the past hour and
> no luck. I hope someone can help me.
>
> Signed
>
> new baker
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: