Hi,
I have the following question related to hub.commit and hub.end:

why does the hub.end() make a rollback?
is it necessary to end the hub after a commit?


C:\alex\project\test\turbogears1>tg-admin shell
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> hub.begin
>>> a= Author(last_name="Greif",first_name="Alex")
 1/QueryIns:  INSERT INTO author (id, first_name, last_name) VALUES (4,
'Alex', 'Greif')
 1/QueryOne:  SELECT last_name, first_name FROM author WHERE id = 4
 1/QueryR  :  SELECT last_name, first_name FROM author WHERE id = 4
>>> hub.commit()
 1/COMMIT  :
>>> hub.end()
 1/ROLLBACK:

Reply via email to