Looking at this you have the User model and for example UserStatusPost
model, I would assume that the user_status_posts table has a field
'user_id'.

If that's the case, why would you not use that model by calling
$this->User->UserStatusPost? I guess the same would apply to most of the
other models.

Be careful about having too many methods in your users controller, if you
can separate logic to separate controllers it would be better I think, and
then use routes to change the url mapping of these controllers if you wish.


On 30 June 2014 09:19, Jeremy Burns : Class Outfit <
[email protected]> wrote:

> That is A LOT of models to load and there is almost certainly a better way
> of cracking your nut. What are you trying to achieve?
>
> On 30 Jun 2014, at 08:33, 'Chris' via CakePHP <[email protected]>
> wrote:
>
> hi guys,.. I'm using to many cross tables in a controller,... and getting
> memory error not enough bites,...
>
>   var $uses = array('User', 'Friend', 'FriendRequest',
> 'UserInvisiblePoint', 'UserStatusPost', 'StatusLike', 'StatusNotification',
> 'ZodiacType', 'Point', 'ProfileComment', 'Gift', 'Guest', 'Resume',
> 'UserBan', 'Invitation', 'Report', 'Photo', 'PhotoFavorite', 'PhotoLike',
> 'PhotoRating', 'PhotoComment', 'Blog', 'BlogComment', 'BlogFavorite',
> 'BlogLike', 'Group', 'GroupFavorite', 'GroupDiscussion', 'GroupMember',
> 'GroupPhoto', 'GroupLike', 'GroupComment', 'Dba', 'DbaFavorite', 'DbaLike',
> 'Video', 'VideoFavorite', 'VideoLike', 'VideoComment', 'Classified',
> 'Event', 'Notification', 'ProfileNotification', 'Bookmark', 'Message',
> 'Alert', 'Signin', 'Signin');
>
> how can I avoid this doing from "user.php" model,...?
>
> thanks in advance,...
>
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.
>
>
>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Kind Regards
 Stephen Speakman

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Reply via email to