[Zope] OFS object attributes from a SQL DB? (ZPatterns)

ra@burningman.com ra@burningman.com
Mon, 04 Feb 2002 23:41:20 -0800


Hi all,

I'm trying to create a Folder-ish ZClass that has certain attributes 
which are actually linked to data that lives in a SQL database.  I know 
I could just use methods to access the data, but I'm trying to gain some 
ZPatterns foo, and it seems to me that I should be able to get this data 
to be exposed exactly as though it were just a regular attribute on a 
PropertySheet.  I'm having a hard time finding the magic combination, 
though...

As I understand ZPatterns, these folder objects should be DataSkins, 
with DataManagers that would fetch and store the data where appropriate. 
  However, if I try to create a ZClass with both OFS:Folder and 
ZPatterns:DataSkin as base classes, whenever I try to add it somewhere I 
get a Key Error for "_v_dm_".

Can anyone help me discover the "right" way to use ZPatterns to make a 
persistent Object File System type of object transparently mingle 
attributes from PropertySheets, SQL Methods, etc.?  I know that I'm 
close... I just can't quite wrap my head around it...

Thanks,

-r