[Dbix-class] Search_rs not returning newly created rows

Bill Moseley moseley at hank.org
Wed Jun 20 19:00:57 GMT 2012


On Wed, Jun 20, 2012 at 1:49 PM, Len Jaffe <lenjaffe at jaffesystems.com>wrote:

>
>
> On Wed, Jun 20, 2012 at 2:39 PM, Bill Moseley <moseley at hank.org> wrote:
>
>>
>> I'd worry less about where your database calls are happening.  Do you
>> really care if [% user.address.city | html %] hits the database in the
>> template or in the controller?
>>
> Well, not caring where this happens tends to lead to the what you describe
> next.  Why not put the address data in the stash? The model knows it will
> need to display it.
>

A bit off the topic here.  There's no perfect solution.  I've unwound loops
in Controllers, too.


>
>
>> One point of the object abstraction is you don't care about the
>> implementation.   The real problem I've seen, though, is doing something
>> stupid like huge nested loops in the template where each one generates a
>> query.
>>
> This is what I meant to about maintenance nightmare.
>
> I've inherited apps like this where I had to roll nested queries (in
> templates) up into a single query to go from 120 round-trips to the
> database, taking 8 seconds, into one round trip, taking half a second.
>
> L.
>
>
> --
> lenjaffe at jaffesystems.com   614-404-4214             www.volunteerable.net
> Proprietor: http://www.theycomewithcheese.com/ - An Homage to Fromage
> Greenbar <http://www.greenbartraining.org/>: Grubmaster: 2012-2009, Grub
> Asst: 2008, Trained: 2007.
>
>
>
> _______________________________________________
> 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
>



-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20120620/d0a=
212a1/attachment-0001.htm


More information about the DBIx-Class mailing list