Hi folks,

I have a structure where a poll is associated with one vote per user, and
each vote is associated with several results.
To manipulate this as easily as possible I use attribute_mapped_collection
and association_proxy - please see the attached file or here :
http://pastebin.com/CR2PCbCZ

It works great but I have a question. The POLL_VOTES table, i.e. my
association table between the polls & the results, has a special field
called VOTE_DT. It's correctly populated at insert time but I'd like it to
be automatically updated whenever the underlying collection (the results)
is updated.

Is it possible ? I documented the expected behaviour in the code snippet
(bottom of the code).

Thanks a lot !
Franck

PS my snippet is based on Michael's advice written last year - thanks for
that !
http://groups.google.com/group/sqlalchemy/browse_thread/thread/e476915147804941/c94ee256eccc0bc1

-- 
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.

Attachment: automatically_update_date.py
Description: Binary data

Reply via email to