You can't specify a condition on a hasMany association as Cake cannot
create a join on such an association.  In order to get a one to many
result set you need to run 2 queries, 1 to find the product and
another to find it's many types as such you are getting a logical
error thrown back at you.

You need to look at forcing joins using

http://book.cakephp.org/view/86/Creating-and-Destroying-Associations-on-the-Fly

or

http://book.cakephp.org/view/872/Joining-tables

HTH

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 [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