Custom archetype storage

Dennis Schulz <[email protected]> Mon, 09 Oct 2006 14:30:51 +0200
Newsgroups gmane.comp.web.zope.plone.archetypes.devel
Message-ID <[email protected]>
Hello,

I am currently devoloping a custom content type with Archtypes that 
should be stored to a relational DB.
As I have to create complex database design with lots of foreign key 
references etc, I consider the SQLStorage feature of Archtypes to 
inflexible for that purpose (only object id and parent id). In addition 
to that unfortunately I have to use MySQL 4 and can't benefit from 
views, triggers etc. as stated in the SQLstorageHowTo that comes with 
Archtypes.

So I thought the best way is writing custom ZSQL Methods that perform 
the db storage when the save button in the base_edit form is pressed and 
fetch the SQL row before the edit or the view form is rendered.

I dont know where to put the python script to perform this tasks.

I don't want to override the accessor and mutator for every single field 
as this is quite inefficient to make a db request for every field. I 
need to define a 'global' mutator / accessor for the whole archetype 
data row, so it is completly synchonized with the external db.

Can anyone give me some hint or even better provide an example?

Thank you very much!

Dennis


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV