OK, was hard to spot, and I think maybe I should change this, there's a line 
where it does this:

>>> users_table = User.__table__

So the original users_table is replaced with the one that User.__table__ is 
mapped to.

I'm going to change that remapping to read like this:

>>> mapper(User, User.__table__, properties={    
...     'addresses':relationship(Address, backref='user', cascade="all, delete, 
delete-orphan")
... })
<Mapper at 0x...; User>

>>> addresses_table = Address.__table__
>>> mapper(Address, addresses_table) 
<Mapper at 0x...; Address>





On Sep 30, 2010, at 6:22 AM, LucianU wrote:

> Hello, all!
> 
> I'm following the tutorial here 
> http://www.sqlalchemy.org/docs/orm/tutorial.html
> and I'm running into some problems at one moment, specifically at the
> "Configuring delete/delete-orphan Cascade" section. Here is a paste of
> exactly what I'm doing http://bpaste.net/show/9861/ . Am I making a
> mistake somewhere or is the tutorial incorrect?
> 
> Lucian
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

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

Reply via email to