On Apr 11, 2007, at 3:05 AM, tml wrote:

>
>          c = session.connect(None)
>          t = c.begin()
>
>          # Execute the insert on the msg_board_data table with lock
> held on parent table's row
>          l = metadata.engine.text("SELECT id from %(parenttable)s

> ...

>          l.execute(table_name=table.name, depth=self.depth+1,
> insert_node_val=self.rgt,
>                      parent_id=self.parent_id, topic=topic,
> rank=self.rank, content=content, author_id=author_id)
>          t.commit()


your "l" text query has no relationship to the Connection you've  
pulled out from session.connect() and therefore no relation to the  
Transaction youve begun on it.  calling its execute() method uses a  
brand new connection.

see the section on "implicit and explicit" execution context in the  
docs (you generally dont want to mix the two approaches).

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to