Skip to content
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

when replacing children having children of their own, things fail #262

Closed
wants to merge 1 commit into from

Conversation

dbu
Copy link
Member

@dbu dbu commented Mar 8, 2013

this is a WIP with failing tests and some tentative fixes that seem to be wrong.

see https://github.com/symfony-cmf/symfony-cmf/wiki/PHPCR-ODM-replace-document for a proposal how to actually solve the problems.

This needs hacks for example in the BlockBundle\Document\ImagineBlock::setImage

@@ -588,6 +588,10 @@ public function persist($document)
throw new \InvalidArgumentException('Parameter $document needs to be an object, '.gettype($document).' given');
}

if (UnitOfWork::STATE_MANAGED === $this->unitOfWork->getDocumentState($document)) {
return;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this causes CascadePersistTest::testCascadePersistForManagedEntity to fail. i would have expected that the new children automatically get persisted, without needing to call persist again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, whatever else we do, this is wrong as we diverge from the logic of what orm is doing in this case.

@dbu
Copy link
Member Author

dbu commented Sep 27, 2013

do we still consider this a blocker for a stable 1.0 release? or can we consider this a known bug and go stable without solving it?

@ElectricMaxxx
Copy link
Contributor

i will close, the branch is backuped on my own fork.

@ElectricMaxxx ElectricMaxxx deleted the merge-replace-deep branch August 5, 2017 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants