On 03/03/2016 07:36 AM, Lele Gaifax wrote:
Simon King <si...@simonking.org.uk> writes:

In general I think it is not recommended to use "secondary" with a table
that you have also mapped a class to. (eg. see the warning at the bottom of
http://docs.sqlalchemy.org/en/rel_1_0/orm/basic_relationships.html#association-object
).

Thank you for the link.

You *might* be able to fix this by setting the cascade behaviour on
Person.preferred_activities to "all, delete-orphan":

Will try that approach. My current workaround is to explicitly delete the
intermediary items before deleting the person instance.

this is likely the solution and we probably need to start writing FAQ entries for what this error message means, it comes up in context of association objects pretty often.



ciao, lele.


--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to