[Zope-dev] Re: zope.sqlalchemy

Martijn Faassen faassen at startifact.com
Tue May 6 07:08:41 EDT 2008


Hey,

Laurence Rowe wrote:
> See pypi or the readme for details, but briefly usage is something like:
> 
>     >>> engine = create_engine('sqlite:///')
>     >>> Session = scoped_session(sessionmaker(
>     ... bind=engine, transactional=True, autoflush=True,
>     ... extension=ZopeTransactionExtension()))
>     >>> session = Session()
>     >>> session.save(User(name='bob'))
>     >>> transaction.commit()

One thing I understood from Christian Theune is that with scoped 
sessions, explicit session.save() is not always necessary. Since I see 
it being used here, could you perhaps comment on this?

This is great news, also for megrok.rdb, which we started to develop at 
the Grokkerdam sprint.

Regards,

Martijn



More information about the Zope-Dev mailing list