Tuesday, June 30, 2009

Re: Having problem with [A] HABTM [B]; [B] hasOne [C]

Some more debug info can be found here:
http://guy.codepad.org/oCi8ZXEU

On Jul 1, 12:33 am, Guy <g.kuizi...@gmail.com> wrote:
> I have a Thesaurus model that joins Synonym model over
> HasAndBelongsToMany and then
> I have a Property model that is joined by Synonym using hasOne, or at
> least should be joined.
> The problem is that even though I am casting
>
> 'hasOne' => array(
>     'Property' => array(
>         'className'                     => 'Property',
>         'foreignKey'                    => false,
>     )
> )
>
> foreignKey to false, I still get simple SELECT WHERE (SELECT
> `Property`.`id`, `Property`.`name`, `Property`.`description` FROM
> `properties` AS `Property`   WHERE `Property`.`property_id` = 12060)
> instead of my needed so JOIN. How to fix that?
--~--~---------~--~----~------------~-------~--~----~
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: