On Oct 11, 2010, at 5:44 PM, yoav glazner wrote: > Hi, > > I would like to know if somthing was really changed in a session, so i can > ask my user: > "are you really sure?" > > using session.dirty doesn't work > > p.value = 1 > session.commit() > p.value = 1 > print session.dirty #p is there! but it didn't change > > is there a way to know this kinda stuff?
No. And I think you are over-optimizing here. The "dirty" flag is enough. The user *has* done something which yielded in a change - even if the result of that something came to no DB-op in the end. But that is hard to judge, and I personally don't think that the domain knowledge your user has is that detailed that he or she can say "but I *know* I didn't really change something, why is it asking me?" For example, in an editor, if you delete a word, and then type it back in - you aren't really asking the editor to *not* show you the "save" button, aren't you? Diez -- You received this message because you are subscribed to the Google Groups "SQLElixir" 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/sqlelixir?hl=en.
