[Nitro] Request for Transaction example
Jonathan Buch
john at oxyliquit.de
Tue Jun 5 11:33:54 EDT 2007
Hi,
store = $og.store
conn = store.conn
begin
store.start
a = User.new; a.name = 'asdf5'; a.save
conn.exec %{INSERT INTO oguser ("real_name", "password", "update_time",
"email", "name", "access_time", "time_deleted", "revision", "phone",
"create_time", "phone2", "customer_oid") VALUES (NULL, NULL, NULL, NULL,
'asdf555', NULL, NULL, NULL, NULL, NULL, NULL, NULL)}
rescue Object
end
store.rollback
It turned out, that the a.save did end up in the store, while
the second one didn't. What does that tell us? We're FUCKED!
I didn't take into account that there are 5 stores to choose from,
each having his own connection and own transaction.
Yes, disturbing. If you will excuse me, I think I'm gonna cry. ;/
Jo
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
More information about the Nitro-general
mailing list