Hi, I have been trying to figure this one out for a while. When I do findAll and try to filter by another associated model it works fine unless that model is in another database.
Instead of HABTM, I'm using hasMany and belongsTo. Still, when I try to filter by a model in another database, I get an error. When I read the SQL being generated it became obvious why this isn't working. For some reason, all models in the first database are in the query, but any models in another database are totally excluded from the query. These models that don't show up in the query still show up in the results. An example would be like this. DB1: local DB2: global I've got models "individuals", "shoes", "individualshoes" in the local database. Then, I've go models "shoetypes", "shoebrands" in the global database. My dilema is this: How do I perform a findAll on individuals with conditions like this "shoebrands.name LIKE '%nike%'". I realize that in this example, I would be better off filtering by shoes.shoebrand_id, but for what I'm doing I need my example to work. Basically this example just won't work any way I try unless shoebrands is in the local database too. Again, I'm not using habtm because I've found it impossible to filter by different models at all that way. I am using hasMany, hasOne and belongsTo where appropriate. I am also using $useDbConfig. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
