OK, I finally made it with this 'join' parameter, that works... but that is not much better than using ->query ;-) A little bit better at least...
I still think there is a bug because I went to the IRC Cake group yesterday evening and discussed the problem, and someone told me that I should set up the backwards relations with HasMany to ensure Model linking... I did so, and it did not change a thing, Cake still thought it would not have to JOIN the deeper models because I was not calling any of their fields. So, Cake is ignoring the fields used in 'conditions' for determing if a Model is needed or not. Thats the bug. When I was doing a normal 'find' without 'fields' I got the correct JOINs and the whole data... but using that COUNT thing messed it up. In the end its probably so that most people will say: If you want to do such a complicated query, just use query, thats what its for... ;-) I just don't like to capitulate ;-) Thanks all. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---