On Thu, 30 Sep 2004, Matt Adams wrote:
> Brian Glass wrote:
>> Regardless, I do agree with Simon that something needs to change in the
>> way Class::DBI::AsForm works in Maypole. It would make thinks
>> considerably snappier.
>
> A solution that I implemented yesterday involved addressing CDBI::AsForm's
> desire to create a drop-down every time it encounters a has_a relationship.
> To evade CDBI::AsForm's annoying habits I created a new View class,
> overloaded the vars() method supplied by Maypole::View::Base and changed
I've come accross the unnecessary use of collections of objects a few
times like this. There is no reason to fetch a bunch of objects,
initialise and instantiate them all for a dropdown or select.
I would really like to get hasMany relationships pulled as simple 2d
arrays of id and name. I used this before when using tangram and
drastically reduced the time it took to fetch long lists for dropdowns and
lists.
Some kind of
$object->ForeignObjectName_asIndex($optional_id_column,$optional_title_column);
would be very useful in CDBI for these kinds of relationships.
Cheers,
A.
-- Aaron J Trevena - Perl Hacker, Kung Fu Geek, Internet Consultant AutoDia --- Automatic UML and HTML Specifications from Perl, C++ and Any Datasource with a Handler. http://droogs.org/autodia_______________________________________________ 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