Re: Process one PloneFormGen request into many SQL tables

Dennis Schulz <[email protected]>
Newsgroups gmane.comp.web.zope.database
Message-ID <[email protected]>
Hi,

if you want to do things like this, you also could use the alchmist product.
However, I think the archetype / plone formgen integration at the moment 
is not functional. (ask kapil t. and roché c. for closer info)
You would have to start out with plain zope 3 schema and formlib like in 
the alchemist included orgpeople example.
I developed a neat little application that uses the unit of work and 
automatic transaction support of sql alchemy and all dependent tables 
are deleted, updated and inserted automatically by the mapper 
(www.*sqlalchemy*.org/)

Dennis


Paul Eipper escribió:
> Hi all !
>
> I am just starting with using Zope/Plone and mySQL(InnoDB) and am
> hitting every bump on the road as I go :P
>
> I have a Form (generated with PloneFormGen+DataGridField) and I need
> to send the data entered there into several mySQL tables. I am
> guessing a Python script would be the right thing here.(?)
>
> My main questions right now are:
>
> 1) How do I maintain referencial integrity?
> I need to get LAST_INSERT_ID() from the first INSERT to use on the
> following inserts.
> Could I have a ZSQL Method that does the insert and returns the
> generated ID to the Python script?
>
> 2) Is a ZSQL Method automatically executed as a transaction? Or do I
> need to manually define BEGIN; COMMIT; to guarantee I am getting the
> correct data?
>
> 3) Where can I find example code (zsql, python scripts) dealing with
> many related tables? All tutorials I found deal with only one table at
> a time, completely ignoring the relational part of the database.
>
>
> Thanks !
>
> -- 
> Paul Eipper
> Brasil
> _______________________________________________
> Zope-DB mailing list
> [email protected]
> http://mail.zope.org/mailman/listinfo/zope-db
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.