[Dbix-class] sub resultset in Template Toolkit presented as an array, not a resultset
rabbit+dbic at rabbit.us
Wed Feb 4 17:23:19 GMT 2015
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...
More information about the DBIx-Class