well, great idea :) i dont know the model things in cake all too well so i have no idea why cake avoids the useful joins..
in my opinion, almost 99% of the queries could be left joins and then it would be totally easy to just change it to inner, where needed till now, i really did not care - as i had only up to 50-100 entries, maybe 300 at the most this resulted in "only" 300-500 queries, depending on how many other tables connected to it^^ but with more than thousand entries and maybe 3 BelongsTo/HasMany connections the number explodes up to many thousand queries - my database goes mad about that (understandable) this is the first time i use custom queries because i have no idea how to manage that problem - so far. On 20 Jan., 17:54, Bernardo Vieira <[email protected]> wrote: > Maybe that's the queue to develop a new 'Joinable' behavior based on the > Containable behavior. > > Mark (Germany) wrote: > > i guess i did forget to mention that i already tried that > > but it gets totally ignored. > > > and besides this fact, i would already be happy if it would do any > > (e.g. left) join > > instead of producing many thousand queries where it would be only > > one... > > > do you have a simple approach to that one? > > with this trick "conditions->array(Model1.id=Model2._model1_id)" > > inside the containable arrays it does not work either (sql errors) > > > On 19 Jan., 19:01, rtconner <[email protected]> wrote: > > >> I think you misunderstand what the containable does. Your complaint is > >> with model bindings in general, and not with this behavior. > > >> In any case, I'll leave you to expiriment and learn, but I wanted to > >> tell you, to do an inner join in cake you use the config.. > >> 'type'=>'INNER' in your binding definition. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
