Please sign in to comment.
Fix PropelObjectCollection to use the right approach during search()/…
…contains() Currently; we try to determine if an object is part of a collection by using a strict comparison, objects have to have the same reference to be considered identical. It could make sense but in real life, you can get the same reference for two objects. By using a hash code, we better handle this special case, only for ActiveRecord objects.
- Loading branch information...
Showing with 214 additions and 56 deletions.
- +1 −1 generator/lib/behavior/nestedset/NestedSetBehaviorObjectBuilderModifier.php
- +1 −1 generator/lib/builder/om/PHP5ObjectBuilder.php
- +39 −1 runtime/lib/collection/PropelObjectCollection.php
- +59 −52 runtime/lib/om/BaseObject.php
- +1 −1 test/testsuite/runtime/collection/PropelCollectionTest.php
- +113 −0 test/testsuite/runtime/collection/PropelObjectCollectionTest.php