Changes between Version 24 and Version 25 of DjangoSpecifications/Core/SingleInstance


Ignore:
Timestamp:
01/30/2009 03:31:37 PM (6 years ago)
Author:
graham_king
Comment:

Added a paragraph about ticket #8159

Legend:

Unmodified
Added
Removed
Modified
  • DjangoSpecifications/Core/SingleInstance

    v24 v25  
    4545}}}
    4646Now let's see, what if condition returns True for a directory and its parent ? If the parent comes first in the main query, it will be modified, saved, reloaded when its child comes up later. If the child comes up first the parent is loaded, modified, saved, and then later on the original value from the outer query will be modified and saved, thus erasing the first change.
     47
     48The lack of an identity map is the root cause of #8159 - foreign key error when deleting yourself. When an object is deleted it's id is set to None. If you delete yourself, your user is in memory twice. Once as the one being deleted, which gets its id correctly None-ed, and once as request.user, which doesn't.
    4749
    4850=== Performance ===
Back to Top