Completely offtopic by now, but have you tried this:
[% var || '0' %]
instead of
[% IF var %]
[% var %]
[% ELSE %]
[% '0' %]
[% END %]
??
(just guessing that you are using Template Toolkit...)
BR
J.
**
El 20/06/12 14:53, Kenneth S Mclane escribió:
Len Jaffe <[email protected]> wrote on 06/19/2012 04:29:53 PM:
> From:
>
> Len Jaffe <[email protected]>
>
> To:
>
> "DBIx::Class user and developer list" <[email protected]>
>
> Date:
>
> 06/19/2012 04:32 PM
>
> Subject:
>
> Re: [Dbix-class] Search_rs not returning newly created rows
>
>
> On Tue, Jun 19, 2012 at 4:57 PM, Kenneth S Mclane
<[email protected]> wrote:
> Len Jaffe <[email protected]> wrote on 06/19/2012 03:45:34 PM:
>
> >
> Strangely, I found that without the prefetch I am getting all the
> data, it's just that the columns are null as you said. It seems to
> do the left outer join when left to it's own devices. I can still
> access the fields in the related tables from my templates. I just
> added some template code to compensate for the null fields.
> I an saddened by the fact that you're making database calls from
> your templates.
> I am consoled by the fact that I don't have to support it :-)
> Glad we could find a solution.
> L.
>
> --
> [email protected] 614-404-4214 www.volunteerable.net
> Proprietor: http://www.theycomewithcheese.com/- An Homage to Fromage
> Greenbar: Grubmaster: 2012-2009, Grub Asst: 2008, Trained: 2007.
>
Wow, way to jump to a conclusion. I am not making a DB call from my
template, I just added an IF so if the field is null it displays a "0"
instead of nothing, just a readability issue. :-)
_______________________________________________
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]
_______________________________________________
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]