I call for a model with bindmodel. Then I bind another model to that
model.
$this->controller->$model->Section->Layout->bindModel

Section binds Layout, and Layout binds TemplateLayout.
With recursive is set to 2 on the model Section, I get all the results
I need. The problem Is that I get extra fields.

Here's my find request:
$this->controller->$model->Section->find(array('`Section`.`id`'=>
$section));

When I change the find request to include only the fields I want, I
get an error:
$this->controller->$model->Section->find(array('`Section`.`id`'=>
$section), array('TemplateLayout.style'));
Query: SELECT `TemplateLayout`.`style` FROM `0_sections` AS `Section`
LEFT JOIN `0_layouts` AS `Layout` ON (`Section`.`layout_id` =
`Layout`.`id`) WHERE `Section`.`id` = 255 LIMIT 1
SQL Error: 1054: Unknown column 'TemplateLayout.style' in 'field list'

Am I using it wrong?
Should I report a bug?

Using 1.2 lastest release (not nightly build)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to