as of 0.3, more or less...technically it just insures that "delete"
and "delete-orphan" is enabled. the 0.2 series had special logic
for associations like this (which was broken in some cases) where it
would do the right thing if you removed one KeywordAssociation, and
added another KeywordAssociation, both of which pointed to the same
Keyword. Normally, SA would try to INSERT the new one then DELETE
the other one, which would break since they have the same "primary
key"...when in reality it should issue a single UPDATE for the two
entities. the 0.3 series detects a condition like that in all cases
so the "association" mapping doesnt have anything special about it
anymore.
On Oct 31, 2006, at 8:27 AM, Steve Zatz wrote:
>
> The diffs are a little hard when you're not sure where the line breaks
> are (and the cascade all appears to be on the wrong line to me) but
> just for my own sanity, you're saying that:
>
> mapper(Item, items,
> properties={'keywords':relation(KeywordAssociation,
> cascade="all,delete-orphan")})
>
> is equivalent to:
>
> mapper(Item, items, properties={'keywords'
> :relation(KeywordAssociation, association=Keyword)})
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---