Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fixed] fix pitfall when using == and != with MangedWeakReference
The following steps should illustrate the problem: 1. Object A is freshly constructed and gets an _objectID of 0. 2. ManagedWeakReference of A is created -> savedObjectID will be also 0 3. ObjectManager::persist is called and A gets a validi _objectID 4. ManagedWeakReference of A will still have the savedObjectID of 0 and will result in wrong behaviour of == and != To circumvent these this commit changes the case when one of the compared ManagedWeakReference instances has a savedObjectID of 0 and checks the actual reference object for the real _objectID.
- Loading branch information