I found the error. The name of the controllers was at the plural
instead of singular.

On Jan 26, 4:56 pm, "andrei.b" <andrei.bogdan.m...@gmail.com> wrote:
> I did that. The select looks like this:
> SELECT `Book`.`id`, `Book`.`isbn`, `Book`.`title`,
> `Book`.`description`, `Book`.`author_id` FROM `books` AS `Book` WHERE
> 1 = 1 LIMIT 20
>
> I use Cake 1.2.5 and php 5.3.1 if this is relevant.
>
> On Jan 26, 4:50 pm, Jeremy Burns <jeremybu...@me.com> wrote:
>
> > If it isn't already there, try turning debug to 2 as this clears the model 
> > cache.
>
> > You can find the setting, which looks like this:
>
> > Configure::write('debug', 2);
>
> > ...in app/config/core.php
>
> > Jeremy Burns
>
> > On 26 Jan 2010, at 14:47, andrei.b wrote:
>
> > > Hello,
> > > I have 2 tables: authors(id, name, email) and books(id, title,
> > > author_id).
> > > I've created models for authors and books:
>
> > > class Author extends AppModel {
> > >    var $name = 'Author';
> > >    var $hasMany = 'Book';
> > > }
>
> > > class Book extends AppModel {
> > >    var $name = 'Book';
> > >    var $belongsTo = 'Author';
> > > }
>
> > > And the 2 controllers:
>
> > > class AuthorsController extends AppController{
> > >    var $name = 'Authors';
> > >    var $scaffold;
> > > }
>
> > > class BooksController extends AppController {
> > >  var $name = 'Books';
> > >  var $scaffold;
> > > }
>
> > > When I runhttp://localhost/relationship/books/insteadof showing at
> > > author the name of the autor it shows me the id of the author.
> > > Can somebody help me?
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > > with their CakePHP related questions.
>
> > > 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+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to