[Zope-dev] ZPatterns Design Issue

Roch'e Compaan roche@upfrontsystems.co.za
Tue, 24 Apr 2001 17:26:36 +0200


How do you bind a SQL Result with multiple records with multiple instance=
s
of the class?  Can you do this in Skinscript? Or do you mean I should ret=
urn
the sql result directly?

Roch=E9

> Why don't you just have the rack's getChildrenFor() method return
> instances
> of the correct class, with all the data filled in from the SQL
> method?  There should be no need to re-retrieve the same items with
> getItem().  Note, by the way, that this does not violate encapsulation,
> since the specialist and racks are specifically the place to put
> implementation-specific versions of multi-object methods like this.
>
> (Btw, if anybody's compiling a ZPatterns FAQ, this should probably get =
in
> there.)
>