Re: HABTM recursively
It all works as it should in my current app. What I have done (since v1.0) is to pass the recursive value as a parameter to find like this: $me = $this-Userfind(id = $myID,null,null,3); // cake 1.0 changed recursive The last parameter is the level of recursion for the find (3). All my models stopped recursing by default whe I updated Cake a few months ago. I guess the recursion is very low by default as a preformance enhancer or something. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: HABTM recursively
I found out that recursion seems to work well. There is a query in debug mode 2, but the values are wrong; more precisely, the Comment.author_id is tested with NULL. Querying for a user only results in all his comments included in the result as supposed. Querying for a news item, which queryies for an 'Author', which therefore queries for comments, that doesn't work. Same with news-comments-author. I think that's because the news refer to users as 'Author' (alias in the query as well) but the author's comments may expect 'User' in some way, I don't know how cake handles this and I'm not able to find out by browsing the code :S Described the whole thing there: http://groups.google.com/group/cake-php/browse_thread/thread/25035ff3c0a24550/efda7db325b09378 But thanks for your help. Didn't know about the last parameter in find() :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: HABTM recursively
Hi Christian, I have not had the problems you describe myself. My HABTM relationships recurse just fine if I set the level as deep as I need it to be. Could you post some of your code possibly? It also struck me as strange that you would need HABTM for comments. I my mind one comment won't be associated with more than one news item. Can a single comment really refer to many news? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---