Ok Im not very familiar with google group too....I thought reply to
author means reply to this article..

below are the contents i wanted to post after you guys.

> Thank you guys ~~ that's woking fine! and made me having deeper
> understanding with cake's model relationship conventions..
> in fact im a Ruby on Rails user, and that's somehow made me choosed
> Cakephp for my php project.
> but .... you can see im trying to fit with cakephp's conventions..need
> some time.
> and these days i got confused with cakephp's pagination component
> again....
>
> So, as the former question's situation, how the pagination setup
> should be?  : (
>
> Thank's a lot~~!!!!!


AND !!  Im having (found) another question is that HABTM association
won't work properly as i wished.
if i do $this->User->GroupMembership->Group->GroupPost-
>find(somthing..............)
the query generated by this method will left join USERS, GROUPS,
GROUPPOSTS three tables but no HABTM join table things.
and if you do $this->User->GroupMembership->Group-
>find('all',array('conditions'=>array('User.id'=>$the_user_id))), it
will raise a SQL query error of
unknown column User.id in where clause. because it wont join users and
join table ,just seleted from groups table.
query as below:

Query: SELECT `Group`.`id`, `Group`.`name`, `Group`.`desc`,
`Group`.`avatar`, `Group`.`created`, `Group`.`updated`,
`Group`.`status`, `Group`.`privacy` FROM `groups` AS `Group` WHERE
`User`.`id` = 4 ORDER BY `GroupMembership`.`created` ASC LIMIT 10

Paul, those you told me to try worked fine because just joining groups
and group_posts will be enough for finding all posts where groups in
id_array.
So..........Im confused again...........

On May 17, 5:22 pm, WebbedIT <[email protected]> wrote:
> Totally agree, as soon as I am doing anything complex with HABTM I
> much prefer modelling my join table and giving it a proper name, was
> just advising the user who I assume is new to cake that it is easier
> to stick with conventions when using HABTM at the start as HABTM can
> easily get it's knickers in a twist.
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to