That is what I was looking for! http://www.sqlalchemy.org/docs/orm/interfaces.html?highlight=attributeextension#sqlalchemy.orm.interfaces.AttributeExtension
Thank you very much! 2011/4/10 Michael Trier <mtr...@gmail.com>: > On Sat, Apr 9, 2011 at 10:32 PM, Hector Blanco <white.li...@gmail.com> > wrote: >> >> Unassigning a user from its userGroup, indeed, puts the UserGroup in >> that user to NULL. But it turns out that the entity that controls the >> permissions is a third thing. That "thing" takes some fields of the >> User class (id, name...) and generates an instance of a third object >> which is in charge of controlling the permissions. That third entity >> is what effectively has the permissions to access (or not) the >> application. Then, when a user is unassigned from a group, I have to >> take that third entity corresponding to that user and remove its >> permissions. >> > > I'm with Mike. It seems the architecture is wrong. That said if you're on > 0.7 you can use signals to handle this. On 0.6 you might want to look into > AttributeExtension. > http://www.sqlalchemy.org/docs/07/orm/events.html > http://www.sqlalchemy.org/docs/orm/interfaces.html?highlight=attributeextension#sqlalchemy.orm.interfaces.AttributeExtension > > -- > Michael Trier > http://michaeltrier.com/ > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalchemy@googlegroups.com. > To unsubscribe from this group, send email to > sqlalchemy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.