Sunday, April 1, 2012

2.1 issue with 'joins' where table is a SELECT

I have an issue with the new 2.1.1 version compared to 2.0.6

In several places in my models I have queries like:

$this->find('all', array(
'joins' => array(
array(
'type' => 'LEFT',
'table' => '(SELECT example.id FROM ...

I know that table should contain "the table for the join" but
sometimes it came very handy to have a select there, and it worked.

Now is no longer working, apparently because where 2.0.6 writes
... LEFT JOIN (SELECT example.id FROM ...
now 2.1.1 writes
... LEFT JOIN `schemaname`.(SELECT example.id FROM...

Any idea on how to upgrade to 2.1.1 without heavily messing with my
existing tested queries?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


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

No comments: