[Dbix-class] sub resultset in Template Toolkit presented as an array, not a resultset
welch.chris at gmail.com
Wed Feb 4 17:31:04 GMT 2015
On 4 February 2015 at 17:23, Peter Rabbitson <rabbit+dbic at rabbit.us> wrote:
> On 02/04/2015 06:14 PM, Chris Welch wrote:
>> However, in my template (having stashed |$divisions|), I'm unable to
>> access the grid_positions_filled object because division.team_seaons
>> gives me an arrayref of team resultsets in that division:
>> # Loop through our divisions
>> FOREACH division IN divisions;
>> CALL c.log.debug(division.team_seasons); # The output of this is
>> something like: ARRAY(0x6f8318c)
> Any relationship accessor is also created with an <accessor_name>_rs
> variant, to work around *exactly* this (mis)feature of TT.
> What you want above is ...division.team_seasons_rs...
> 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/
> dbix-class at lists.scsys.co.uk
Fantastic, thank you so much for that! I'm glad it was that easy...!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the DBIx-Class