On Mon, Sep 8, 2008 at 12:37 PM, Mark Ramm <[EMAIL PROTECTED]> wrote:
>
>> I'm not sure I was clear.  Ignoring the use of paster setup-app, the
>> purpose of initializeDB.py in the Wiki example is to populate the
>> database with the schema as specified in the __init__.py file in the
>> models directory.  It is also intended to add an entry to the pages
>> table and commit this entry to the database.  The Wiki example
>> requires that there be at least one row in the pages table.  While
>> this implementation for adding an entry to the pages table may have
>> previously worked in older versions of 2.0, it no longer works, and
>> the change that you suggested, commenting out DBSession.commit(), does
>> not address this problem.  I found it necessary to add the
>> transaction.commit() line to actually commit the pages table entry to
>> the database.
>
> You are correct.   I wasn't thinking through the fact that
> InitializeDB was still using the session manager from zope.transaction
> rather than a normal sqlalchemy session.

What is the difference between sqlalchemy session from
zope.transaction rather then normal sqlalchemy session with
autocommit=False?

Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to