On Wed, Jun 20, 2012 at 11:51 AM, Kenneth S Mclane <[email protected]>wrote:
> From what I understand from the books and docs etc, I am putting the > results of a DB call into the stash, my template code just loops through > what is stored in the stash. The pager does go back to the db, but I don't > know of any other way to do it. I'm just following the docs and that's what > they show. If there is a better way I'd be happy to work on that. > Any chance you can put together a complete (and very simple) example that shows what you are seeing? Should be able to do it with just a few files w/o Catalyst and include code to populate the database. Then put that some place we can fetch and test -- assuming just the act of doing that doesn't resolve the issue. I'd worry less about where your database calls are happening. Do you really care if [% user.address.city | html %] hits the database in the template or in the controller? One point of the object abstraction is you don't care about the implementation. The real problem I've seen, though, is doing something stupid like huge nested loops in the template where each one generates a query. Watch the logs. Having an ORM doesn't mean you don't pay attention. -- Bill Moseley [email protected]
_______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
