Michael, I see you dont like the ability to flush only specific objects as it brings more troubles than profit. I agree in almoust all cases, but... Let me show where does it need for me.
It is not so rare case when developer needs to catch creating or updating instance. In some orm's (not hard to guess, which) it's done via simple model's method 'save()' or so (behavior of this methid is similar to `sess.flush([obj])`). One's able to explicitly call it wherever it needed. And it gives total control of what actually happen. Wait! I know that sqlalchemy's orm is much more high-level and it allows to abstract from low-level insert and update queries and rely on session's job. And I know that mapper supports extensions and it is able to listen insert and update events. But it is hard to use just because extension must be used in mapper's constructor arguments and it is (afaik) impossible to set extensions later. So, what it all about? I see that topic subject is subject of deprecate. And I will be forced to use mapper's extensions to have control on saving objects. If so, what do you think about some kind of async events system? Something like PyDispatcher, Louie or Django's dispatch. It can be used not only with mapper's events but also with ddl-events. The main pro of this approach is the ability to subscribe to (or unsubscribe from) such events in run-time. -- Angri --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---