Menu

#4 data goes from clean to dirty even if no change

closed
None
2014-08-15
2012-09-20
Anonymous
No

a data goes from clean to dirty when you affect a value to an attribute, even if the new value is equal to the old one.

>>> d = Device.query.get(id=1)
>>> print d
<Device id=1, v=False>
>>> d in DBSession.uow.clean
True
>>> d.v = False
>>> d in DBSession.uow.clean
False
>>> d in DBSession.uow.dirty
True

I think the uow status should not work if the value does not actually change.

Discussion

  • Anonymous

    Anonymous - 2012-09-20

    Ooops, should be "status should not change" and not "status should not work"

     
  • Rick Copeland ☕

    • status: open --> closed
    • assigned_to: Rick Copeland ☕
     

Anonymous
Anonymous

Add attachments
Cancel