[Dbix-class] Search_rs not returning newly created rows
Kenneth S Mclane
ksmclane at us.ibm.com
Wed Jun 20 16:51:46 GMT 2012
>From what I understand from the books and docs etc, I am putting the
results of a DB call into the stash, my template code just loops through
what is stored in the stash. The pager does go back to the db, but I don't
know of any other way to do it. I'm just following the docs and that's
what they show. If there is a better way I'd be happy to work on that.
Benjamin Hitz <hitz at stanford.edu> wrote on 06/20/2012 11:06:57 AM:
> From:
>
> Benjamin Hitz <hitz at stanford.edu>
>
> To:
>
> "DBIx::Class user and developer list" <dbix-class at lists.scsys.co.uk>
>
> Date:
>
> 06/20/2012 11:34 AM
>
> Subject:
>
> Re: [Dbix-class] Search_rs not returning newly created rows
>
> Not to get in the way here... but I think (not a Dbix::Class/
> Catalyst expert) that Len is saying that:
>
> putting {accounts => $rs and pager => $rs->pager()}in the stash is
> effectively forcing the template system to make DB calls. It has to
> be even though Kenneth didn't actually post his template code.
>
> At first I thought it was just the pager, but I re-read and saw the
> $rs itself was passed.
>
> But I am not posting this just to pile on (and in fact, I could well
> be wrong -- or correct materially but wrong in details)... but I
> want to ask Len:
>
> What is bad about this design? Especially in a case where the
> pager (possibly not this one) has to fetch pages?
>
> Is the (your) preferred design pattern to put any UI fetches behind
> a webservice/ajax call?
>
> Thanks,
> Ben
>
> On Jun 20, 2012, at 8:04 AM, Len Jaffe wrote:
>
> On Wed, Jun 20, 2012 at 8:53 AM, Kenneth S Mclane <ksmclane at us.ibm.com>
wrote:
> Len Jaffe <lenjaffe at jaffesystems.com> wrote on 06/19/2012 04:29:53 PM:
>
> 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. :-)
>
> Sorry if you think I jumped anywhere.
> I assure you my conclusion was well-reasoned and reached via careful
> deliberation.
>
> L
>
> --
> Ben Hitz
> Senior Scientific Programmer ** Saccharomyces Genome Database ** GO
Consortium
> Stanford University ** hitz at stanford.edu
>
> _______________________________________________
> 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@lists.scsys.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20120620/5618d02c/attachment-0001.htm
More information about the DBIx-Class
mailing list