cake-php@googlegroups.com
[Top] [All Lists]

Re: Can someone explain ORM

Subject: Re: Can someone explain ORM
From: WebbedIT
Date: Wed, 24 Feb 2010 23:56:29 -0800 PST
Hope you enjoyed your holiday.

The query:
"SELECT `Cat`.`id`, `Cat`.`title`, `Cat`.`location_id`,
`Cat`.`created`, `Cat`.`modified` FROM `cats` AS `Cat` WHERE
`Subcat`.`cat_id` = `Cat`.`id`"

Cannot originate from the call:
$this->set('local', $this->paginate('LocalInfo'));

If you have force joined all the tables paginate will run just one
query to get all the data, and as such it would obviously include the
LocalInfo table.  If you set debug to 2, can you see a query which is
joining all the models you want and is this a strange extra one?

Paul

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@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

<Prev in Thread] Current Thread [Next in Thread>