Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 5 and Version 6 of UsingSqlAlchemy


Ignore:
Timestamp:
02/14/06 13:55:59 (9 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UsingSqlAlchemy

    v5 v6  
    9494in ``tg-admin shell`` by simply ``engine.echo = 1`` in the interpreter. 
    9595 
    96 Be aware that SQLAlchemy has implicit transactions on all the time via the 
    97 Unit of Work abstraction. This means that you need to call 
    98 ``objectstore.commit()`` to push your changes to the db. If you're running an 
    99 ``assign_mapper`` object, you can call the object's ``commit()`` directly. A 
    100 rollback is ``objectstore.clear()``. 
     96Be aware that SQLAlchemy has transactions on all the time via the 
     97Unit of Work abstraction and they are **NOT** implicit. This means that you 
     98need to call ``objectstore.commit()`` to push your changes to the db, even in 
     99the controller methods. If you're running an ``assign_mapper`` object, you can 
     100call the object's ``commit()`` directly to commit the object. A UoW rollback is 
     101``objectstore.clear()``. 
    101102 
    102103You can change a column's name using the ``alias`` parameter of the ``Column``