[Dbix-class] sub resultset in Template Toolkit presented as an array, not a resultset
Peter Rabbitson
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)
> END;
> -%]
>
> ...
>
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...
Cheers
More information about the DBIx-Class
mailing list