[Zope-dev] Re: [Zope] ZPatterns Question
Steve Alexander
steve@cat-box.net
Mon, 07 Aug 2000 17:19:19 +0100
I've moved your question to zope-dev, as that's where ZPatterns
questions probably belong.
Roche wrote:
> I created a ZClass called "Product" with Dataskin as baseclass.
>
> I also added a specialist called ProductManager containing a default rack.
> Under storage for the rack I selected the newly created Product ZClass.
>
> My product ZClass needs to query both a RDBMS and the ZODB for
> attributevalues. At this point I get lost.
> I guess i should add an attributeprovider plug-in???
The easiest way is to use a couple of SheetProviders. Use a
PersistentSheetProvider for your ZODB values. You'll have to write your
own one for SQL values.
You will need to create the appropriate propertysheets in your ZClass
class definition in your product.
> What should go into the fromexpr and attrsexprs properties of the
> attributeprovider? Should one add an attributeprovider for each attribute
> of the product?
See the IRC chat log:
http://www.zope.org/Documentation/Chats/zpatt_chat_log
An attribute provider can provide multiple attributes. You can have
multiple attribute providers if you like.
--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net