Process one PloneFormGen request into many SQL tables

"Paul Eipper" <[email protected]>
Newsgroups gmane.comp.web.zope.database
Message-ID <[email protected]>
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
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.