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

[DDC-3343] Entities should not be deleted when using EXTRA_LAZY and one-to-many #1169

Closed
wants to merge 2 commits into from

Conversation

asprega
Copy link
Contributor

@asprega asprega commented Oct 24, 2014

Here's a failing test case for the issue I filed a few days ago: http://www.doctrine-project.org/jira/browse/DDC-3343

Notifying @Ocramius.

$this->_em->clear();

$user = $this->_em->find(__NAMESPACE__ . '\DDC3343User', $user->id);
$this->assertNotNull($user);
Copy link
Member

Choose a reason for hiding this comment

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

use assertInstanceOf here

@echochamber
Copy link

I've experienced this issue as well. Entity mapped with Extra Lazy loading. I want to remove element from a collection on the "One" side of the ManyToOne relationship, but not delete the entity from the database. This issues a delete query to delete the record of entity being removed from the collection when it should actually not issue a query at all (or just null out of the foreign key column).

@asprega
Copy link
Contributor Author

asprega commented Jan 4, 2015

@Ocramius any updates? do you want me to propose a fix?

@Ocramius
Copy link
Member

Ocramius commented Jan 4, 2015

@asprega I didn't check this yet

@Ocramius Ocramius changed the title [DDC-3343] Failing test case [DDC-3343] [Test] Failing test case Jan 16, 2015
@Ocramius Ocramius changed the title [DDC-3343] [Test] Failing test case [DDC-3343] Entities should not be deleted when using EXTRA_LAZY and one-to-many Jan 24, 2015
@Ocramius Ocramius self-assigned this Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
…ociated values when they are removed, but just update the owning side
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
…azy specific tests (some DELETE operations became UPDATE operations)
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
… an extra-lazy collection still updates the owning side values
@Ocramius
Copy link
Member

Moved to #1281

@Ocramius Ocramius closed this Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 24, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 27, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 27, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Jan 28, 2015
Ocramius added a commit that referenced this pull request Jan 28, 2015
…-many-is-noop-when-not-doing-orphan-removal

Hotfix - #1169 - extra lazy one to many must be no-op when not doing orphan removal
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
…anges should be no-op unless orphan removal is specified.
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
…anges should be no-op unless orphan removal is specified.
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
…existing properties, inexisting owning side assigned
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
…ith the data when `orphanRemoval` and `EXTRA_LAZY` are combined
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
…anges should be no-op unless orphan removal is specified.
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
…anges should be no-op unless orphan removal is specified.
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
…nexisting properties, inexisting owning side assigned
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
…with the data when `orphanRemoval` and `EXTRA_LAZY` are combined
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
…tity persister to perform deletes on the owning side
Ocramius added a commit to Ocramius/doctrine2 that referenced this pull request Feb 5, 2015
Ocramius added a commit that referenced this pull request Feb 16, 2015
…any-persister-deletes-only-on-extra-lazy-plus-orphan-removal-2.4

[2.4] #1169 DDC-3343 one-to-omany persister deletes only on EXTRA_LAZY plus orphanRemoval
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.

3 participants