[Dbix-class] Search_rs not returning newly created rows

Len Jaffe lenjaffe at jaffesystems.com
Wed Jun 20 18:49:56 GMT 2012


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.


> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20120620/8ed=
bcad2/attachment.htm


More information about the DBIx-Class mailing list