Re: [Maypole-dev] Re: Patch to support compound primary keys

From: Marcus Ramberg (marcus at thefeed.no)
Date: Mon Dec 06 2004 - 11:11:04 GMT


Simon Flack wrote:

> Marcus Ramberg wrote:
>
>> Your proposed solution feels like a hack. The fact is, ::Base is too
>> CDBI centric, and this would be a good way to start remedying that..
>> populate_objects would be an abstract method in ::Base, and
>> implemented with retrieve in ::CDBI ... That means that CDBI is
>> optimised for the common cases (retrieving by PK from args) and
>> easily overridable for custom actions ( not populating at all,
>> populating from node, whatever you like). And the best part is, this
>> won't break anything in existing apps.
>
>
> Ok, lets go with this. But I think I'd rather it be fetch_objects,
> i.e. it shouldn't set objects itself, just return them. I think
> that'll make it more reusable.

oki.

$r->objects([$self->fetch_objects($r)]);

in process? I'll implement this.

Marcus



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