I use transactions and sometimes it must be *session.rollback*.
Sometimes i get a AttributeError: 'NoneType' object has no attribute
'twophase'
That error raises, when one transaction open and processed, and *another*
transaction with session use *rollback*
--
SQLAlchemy -
The Python SQL
On Sat, 7 Jun 2008 22:21:20 -0700 (PDT)
Tomer [EMAIL PROTECTED] wrote:
I have two follow-up questions:
1) From what I understand, if I read an object (eg, Student) from
the database, modify that object or other objects, and then commit, I
have no guarantee that the object didn't change
If I am just issuing a read-only query, and I want to make sure that
nothing will change in the middle, do I need a transaction? If so,
what do I do with it when I'm done - commit or rollback?
For example, I want to do this:
for user in Session.query(User):
print user.name
Should I use a
Hi all,
I have a question about transactions
I need to insert data into two tables (anag and user), sice I need to
insert the generated primary key of anag into user.
I have to flush anag to have the id to insert into user table.
What happens if there's an interruption in the middle of
Hi,
The following program outputs 1; I thought it should output 0. Any comments?
from sqlalchemy import *
db = create_engine(sqlite:///:memory:)
metadata = BoundMetaData(db)
users = Table('users', metadata,
Column('user_id', Integer, primary_key=True),
Column('user_name', String))