Em Saturday 03 May 2008 15:46:08 [EMAIL PROTECTED] escreveu:
> If noticed there are 2 ways to manually commit database changes (such
> as in a script outside of TurboGears)....
>
> model.__connection__.commit()
>
> and
>
> MyClass._connection.commit()
>
> I was wondering what the differences are and why there are 2 ways.

Check SO / SA docs (it depends on what you use) and see what each thing means 
and what is their difference.

Hint: check the context of each and what is being commited (just current 
transaction or all transactions from all connections).


> tg-admin shell
Python 2.5.1 (r251:54863, Jan 10 2008, 18:01:57) 
Type "copyright", "credits" or "license" for more information.

IPython 0.8.1 -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
%magic  -> Information about IPython's 'magic' % functions.
help    -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import model

In [2]: model.__connection__ is model.User._connection
Out[2]: False

In [3]: 



-- 
Jorge Godoy      <[EMAIL PROTECTED]>


--~--~---------~--~----~------------~-------~--~----~
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