I'm trying to get set a condition on a generateList. The model of the list HABTM another model which is the one where I want to set the conditions. The equivalant SQL would be something like this:
select a.* from a, b where a.id=b.a_id and b.id='x' Or something like, I'm looking at a page about a corvette, and I want a select list with all the car parts (A) that have a part groups (B) that is set to 'sports car' (X). car parts HABTM part groups as a steering wheel can belong to either sports cars, and trucks With debug turned on you can see the query it's building and it's not joining in my HABTM table, but it does have the blongsTo association joined. I think I've traced the problem to this code: http://api.cakephp.org/dbo__source_8php-source.html#l00494 if (true === $this->generateAssociationQuery(...)) { $linkedModels[] = $type . '/' . $assoc; } Where generateAssociationQuery() can not return === true it's only designed to return $sql. http://api.cakephp.org/dbo__source_8php-source.html#l00988 >From what I can tell $linkedModels[] matches the tables that are joined in the debug query. And since that if does not return === an element is never assigned for the HABTM table. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
