Reputation: 355
I'm trying to find a way to get the current logged in user with additional data without running another query, for example lets say each user has one to many relation to messages, so if I run in controller $user = $this->getUser(); $userMessages = $user->getMessages(); I will have to run two queries, I'm looking for a way to force\change the getUser function to pre-load the data with join statement.
Upvotes: 1
Views: 75