Hello, Vadim,

> def loadinfo(self):
>
>         mr_jones = model.Person()
>
>         mr_jones.name = 'Mr Jones'
>
>         model.meta.Session.save(mr_jones)
>
>         model.meta.Session.commit()

The problem is in how you have created session. Since I don't know
what's your SqlAlchemy version and how you create session I can't help
you much.

My guess is that you are using SqlAlchemy 0.4 and set transactional to False:
http://www.sqlalchemy.org/docs/04/session.html#unitofwork_managing

In that case you should begin your transaction: model.meta.Session.begin()

-- 
Dalius
http://blog.sandbox.lt

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to