[Maypole] Maypole responding to requests very slowly (or, how to get just one associated record instead of getting the world)

From: Matt Adams (matt.adams at morcor.com)
Date: Wed Sep 29 2004 - 17:33:03 BST


Hi:

This may actually be a Class::DBI question but I'm curious to know how to
convince Maypole to use Class::DBI differently. I've played with Maypole a bit
but I'm still trying to get my head around how it does some things.

I've got a couple tables, account and contact, where each contact has_a account.

In my test database, there 3 contacts and some 7000 odd accounts. My problem is
that whenever I go to display the current account preferences via

sub preferences :Exported {
        my ($self, $r) = @_;
        $r->{objects} = [ $r->{user} ];
}

something in the Maypole framework looks up every possible account which takes a
  very long time. It does manage to stringify contact.accountCode to
account.accountName properly, but in some cases (like when preferences are
displayed) I'd really like Maypole to look up the single related account record,
not every account record in the table.

Is this possible? What should I be looking at to override Maypole's default
behaviour?

I'd really appreciate any comments or suggestions, even if I'm completely lost.

Thanks in advance,

Matt

-- 
Matt Adams <matt.adams at morcor.com>
Development Specialist
Morcor Solutions Inc. <http://www.morcor.com/>
(613) 354-2912 x228

GnuPG public key at <http://staff.morcor.com/~madams/> Key fingerprint: BED5 B4F7 CCF5 D7B5 7C56 0505 9A0A A0FB C937 5975

_______________________________________________ maypole mailing list maypole at lists.netthink.co.uk http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:56 GMT