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

Unique index generated for one-to-one relation causes errors when replacing entities. #7721

Open
LukasKrc opened this issue May 24, 2019 · 0 comments
Labels

Comments

@LukasKrc
Copy link

LukasKrc commented May 24, 2019

Bug Report

Q A
BC Break no
Version 2.6.3

Summary

A unique index error is caused when replacing entities (that is removing an existing relation and creating a new one) from the inverse side of a one-to-one relation.

Current behavior

When replacing an entity from the inverse side of a one-to-one relation, a unique index error is caused. This happens because the previously persisted related entity is not deleted before an attempt to insert the new one is made.

This was supposedly fixed in a previous issue: #2310. There is another issue which is partially related to this one: #6776.

How to reproduce

Please see this pull request: #7722 for an example test case.

Expected behavior

The expected behavior is that no unique index error is caused during the mentioned scenario.

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

No branches or pull requests

2 participants