[Catalyst] $c->user->some_relationship always retrives user id from
the db
Moritz Onken
onken at houseofdesign.de
Wed Feb 13 16:53:33 GMT 2008
Hi,
I request all albums of a user by calling $c->user->albums->all;
That results in a query which retrieves the user id and then querys
the album table with that user id in the where clause.
It works, but how can I prevent that first query which retrieves the
user id? Can't I store the user id in the session so that the query
could use that value instead of receiving it from the database?
I looked through the docs but couldn't find anythink. I hope this is
the right place to ask.
Thanks in advance,
moritz
More information about the Catalyst
mailing list