On Feb 17, 2007, at 2:55 AM, jose wrote:
> My definition was:
>
> assign_mapper(context, Attivita, tbl['attivita'], properties = dict 
> (specie = relation(Specie, backref='attivita'))
>
> now it is:
>
> assign_mapper(context, Attivita, tbl['attivita'], properties =
> dict(specie = relation(Specie))
> and it works as I want. :-)
>

yea a backref is essentially this:

mapper(Attivita, a_table, properties={
     'specie':relation(Specie)
})

mapper(Specie, b_table, properties={
     'attivita':relation(Attivita)
})

so without the backref you have one less "relation" set up.

but i have bad news for you, SA should be managing that relationship  
in the way you dont like for both of those relations.  im not sure  
why it isnt working, because even if you havent loaded the dependent  
item into the session, the delete operation should be loading it in.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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