Diez B. Roggisch schrieb:
> What happens if you leave out the connection()-call? Directly using execute
> on
> the session should be supported (and thus use the session)
This is only a shortcut and should not make any difference. It works,
but the problem is that zope.sqlalchemy does not notice that data was
modified and therefore does not commit the transaction.
It should works as soon as you add any other statement that marks the
session as dirty, like this dummy "bulk" delete:
@expose()
def insert_a_record(self):
DBSession.execute(foo_table.insert({'user_id':2, 'org_id': 2}))
DBSession.query(User).filter(User.user_id == None).delete()
return "Successful!"
-- Christoph
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---