I'm glad there are more than me getting frustrated about this behaviour. This is the first problem I ran into after fiddling around with CakePHP for the first time. I could not believe my eyes when looking through the query-debug after doing my first contain-test.
I hope this gets fixed in the future. On Jan 21, 1:04 am, "Mark (Germany)" <[email protected]> wrote: > 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 > >Containablebehavior. > > > 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 thecontainablearrays it does not work either (sql errors) > > > > On 19 Jan., 19:01, rtconner <[email protected]> wrote: > > > >> I think you misunderstand what thecontainabledoes. 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 -~----------~----~----~----~------~----~------~--~---
