Hi,
I want to use a DBIx::Class resultset object in a TT template, but I am
missing something and I can't get the correct value.
I have a row object $user and I want to get the number of comments sent by
that user from a related table named user_comment, using the relation
user_comments. The p
[% number_of_comments = user.user_comments_rs.count %]
* How do I use DBIx::Class objects in my TT templates?
Like normal objects, mostly. However you need to watch out for TT
calling methods in list context. When calling relationship accessors
you will not get resultsets, but a list of all the re
Thank you! I knew about search_rs and I use it, but I didn't know that I can
add _rs to any relation that generate a resultset when is accessed.
Octavian
---
From: "Oleg Kostyuk"
[% number_of_comments = user.user_comments_rs.count %]
* How do I use DBIx::Class objects in my TT templates?
Like