Hi,
 The models file name should be singular form of the DB.
The problem is file name, after changing the filename it works as
scaffolding



On Jan 28, 3:17 am, BrendonKoz <[email protected]> wrote:
> Okay, I just re-read that.  I don't know what he meant, but my last
> reply will probably fix the issue.
>
> On Jan 27, 11:27 am, BrendonKoz <[email protected]> wrote:
>
> > I believe he meant the $name property within the controller.
>
> > var $name = 'Author';
> > ...should be...
> > var $name = 'Authors';
>
> > On Jan 26, 11:11 am, euromark <[email protected]> wrote:
>
> > > but it is supposed to be plural
> > > class BooksController extends AppController {
>
> > > On 26 Jan., 16:30, "andrei.b" <[email protected]> wrote:
>
> > > > I found the error. The name of the controllers was at the plural
> > > > instead of singular.
>
> > > > On Jan 26, 4:56 pm, "andrei.b" <[email protected]> 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 <[email protected]> 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/insteadofshowingat
> > > > > > > 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.organdhelpotherswiththeirCakePHP related 
> > > > > > > questions.
>
> > > > > > > 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 
> > > > > > > athttp://groups.google.com/group/cake-php?hl=en-Hidequoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -

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 [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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to