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

[Bug]: Fix unique constraint issue when updating advanced many-to-many #17344

Merged
merged 6 commits into from
Oct 25, 2024

Conversation

kingjia90
Copy link
Contributor

Changes in this pull request

Potentially resolves #16265

Additional info

It seems that #15746 applied only to ObjectMetadata's CREATE TABLE while the migration ran for both ObjectMetadata and ElementMetadata (as it should, supposing the ObjectMetadata anti-deadlock changes are fine).

So existing data at the time migration ran are fine, anything new afterwards is likely not working fine and won't work with the fixes because metadata_un doesn't exists.

A little bit tricky because we basically need to re-run Pimcore\Bundle\CoreBundle\Migrations\Version20230616085142 somehow but shouldn't be in a bugfix release.

@kingjia90 kingjia90 added the Bug label Jul 15, 2024
Copy link

Review Checklist

  • Target branch (11.3 for bug fixes, others 11.x)
  • Tests (if it's testable code, there should be a test for it - get help)
  • Docs (every functionality needs to be documented, see here)
  • Migration incl. install.sql (e.g. if the database schema changes, ...)
  • Upgrade notes (deprecations, important information, migration hints, ...)
  • Label
  • Milestone

Copy link

@kingjia90
Copy link
Contributor Author

kingjia90 commented Jul 15, 2024

but wait, i cannot reproduce the error described in pimcore/data-hub#819 anymore, @dkarlovi would you be able to check if it is still throwing errors?

@mcop1
Copy link
Contributor

mcop1 commented Aug 9, 2024

@kingjia90 Just tried to reproduce the issue described in the data-hub. Stumbled upon it while working on other things and was interested. Couldn´t reproduce it as well, updating the quantity in the relation's metadata worked fine.

@dkarlovi Is the problem still there for you? Could you please try to reproduce it once again? Would be appreciated.

@kingjia90 kingjia90 changed the base branch from 11.3 to 11.4 October 1, 2024 08:54
@kingjia90 kingjia90 changed the base branch from 11.4 to 11.x October 25, 2024 08:11
@kingjia90 kingjia90 added this to the 11.5.0 milestone Oct 25, 2024
kingjia90 and others added 4 commits October 25, 2024 10:24
…onstraint

# Conflicts:
#	bundles/CoreBundle/src/DependencyInjection/Compiler/FlysystemVisibilityPass.php
#	bundles/CustomReportsBundle/src/Controller/Reports/CustomReportController.php
#	bundles/InstallBundle/src/Installer.php
#	lib/Tool.php
#	models/DataObject/ClassDefinition/Data/ReverseObjectRelation.php
Copy link

sonarqubecloud bot commented Oct 25, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
77.9% Duplication on New Code

See analysis details on SonarCloud

@kingjia90 kingjia90 merged commit eca112d into 11.x Oct 25, 2024
19 checks passed
@kingjia90 kingjia90 deleted the fix-metadata-unique-constraint branch October 25, 2024 09:19
@github-actions github-actions bot locked and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: updating advanced many-to-many relationship fails when changing metadata
3 participants