-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #603 #604
Fix #603 #604
Conversation
TestSuite output: $ phpunit test/testsuite/misc/MoreRelationTest.php PHPUnit 3.7.13 by Sebastian Bergmann. Configuration read from /Users/marc/Propel/phpunit.xml.dist F Time: 0 seconds, Memory: 18.75Mb There was 1 failure: 1) MoreRelationTest::testContentsDeletion We assigned a collection of only one item. Failed asserting that 4 matches expected 1. /Users/marc/Propel/test/testsuite/misc/MoreRelationTest.php:97 FAILURES! Tests: 1, Assertions: 2, Failures: 1.
Added a test set that proves the bug.
Wait, please not merge yet. Have had a dream with another scenario where this fails too. Am trying to reproduce it later on the pc. |
@@ -4090,11 +4104,13 @@ protected function addRefFkScheduledForDeletion(&$script, $refFK) | |||
$queryClassName = $this->getNewStubQueryBuilder($refFK->getTable())->getClassname(); | |||
|
|||
$localColumn = $refFK->getLocalColumn(); | |||
$localColumn->isNotNull(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value is never assigned
…ryKeys` at class ForeignKey and use it in the PHP5ObjectBuilder to check whether we have to backup the data of the relation entries to be able to manipulate it later. Added these methods because `isForeignPrimaryKey` returns only true if _all_ foreign columns are pks, which is not useful in this case.
$this->assertEquals(1, $count, 'We assigned a collection of only one item.'); | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless blank lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, not done yet.
let me know when it's ok. |
… proves that 'onDelete=setnull' works, too.
Done. |
Could you rebase? |
Hum, yeah, I meant "squash", not rebase... |
Sorry, destroyed my branch. Git rebase hates me ;o) Created a new PR. |
*/ | ||
public function __clone() | ||
{ | ||
foreach ($this as $key => $obj) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this also make sense for the onDemand collections, or should this be overwritten and implemented differently for those? I would suppose a ondemand collection would hydrate all rows and therefore would no longer be lazy loaded,..?
Anything is explained in #603