Re: [sqlalchemy] Why is an association object mark as "dirty" instead of "deleted" when removed?

2015-05-06 Thread Mike Bayer
On 5/6/15 9:56 AM, st...@canary.md wrote: Hmm, I don't think I could listen to the attribute event; it's saying that the AssociationProxy doesn't have "dispatch". oh. well yes, the event has to be on the "mapped" attributes that the association proxy is proxying. the associationproxy is ju

Re: [sqlalchemy] Why is an association object mark as "dirty" instead of "deleted" when removed?

2015-05-06 Thread steve
Hmm, I don't think I could listen to the attribute event; it's saying that the AssociationProxy doesn't have "dispatch". Also, suppose I could detect the orphan-deletes earlier, what's the best way to suppress the objects marked as dirty? Here's my version of your code if it helps: https://gi

Re: [sqlalchemy] Why is an association object mark as "dirty" instead of "deleted" when removed?

2015-04-29 Thread Mike Bayer
On 4/29/15 12:11 PM, st...@canary.md wrote: Since my association object doesn't have extra columns, the row ('bob, 'apple') will be deleted. However, if there are extra columns, then having it marked as "dirty" is desired. Perhaps I would delay my recording of my audit rows until after orph

Re: [sqlalchemy] Why is an association object mark as "dirty" instead of "deleted" when removed?

2015-04-29 Thread steve
Since my association object doesn't have extra columns, the row ('bob, 'apple') will be deleted. However, if there are extra columns, then having it marked as "dirty" is desired. Perhaps I would delay my recording of my audit rows until after orphans are resolved. I am already using "after_flus

Re: [sqlalchemy] Why is an association object mark as "dirty" instead of "deleted" when removed?

2015-04-28 Thread Mike Bayer
On 4/28/15 6:57 PM, st...@canary.md wrote: Hi, Background information: I am trying to implement functionality similar to the history_meta.py example (http://docs.sqlalchemy.org/en/rel_0_9/_modules/examples/versioned_history/history_meta.html). I am listening for after_flush events and creat

[sqlalchemy] Why is an association object mark as "dirty" instead of "deleted" when removed?

2015-04-28 Thread steve
Hi, Background information: I am trying to implement functionality similar to the history_meta.py example (http://docs.sqlalchemy.org/en/rel_0_9/_modules/examples/versioned_history/history_meta.html). I am listening for after_flush events and create an audit record and am having problems with