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

How to avoid updating of the referenced entity, when the owning side gets changed? #6786

Closed
automatix opened this issue Oct 22, 2017 · 2 comments

Comments

@automatix
Copy link

Hello!

I have two entities: Foo and Bar with a unidirectional ManyToOne relationship between them (Bar has Foo).

foo-bar-buz_model

When I try to re-/unset Bar#foo, Doctrine tries not only change the reference (change/reomve the value in the column bar.foo_name), but also to UPDATE the value of foo.name.

In my case it leads to an Integrity constraint violation error. But even if not -- it's not the expected behavior.

Is it a bug or a layer-8-issue? :)

@Ocramius
Copy link
Member

@automatix
Copy link
Author

I wrote a test and have just opened a pull request. The test is working, so it won't be a Doctrine issue. I'm closing this issue. But, anyway, if you have an idea, what it might be caused by, it would be nice, if you share your thoughts about it. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants