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

Many to one Relation - invalid database data #5189

Open
ckogler-elements opened this issue Nov 4, 2019 · 3 comments

Comments

@ckogler-elements
Copy link
Contributor

@ckogler-elements ckogler-elements commented Nov 4, 2019

Relations are not properly "cleaned".
Eg. you have a customer object with a many to one relation (mainAddress) to a address.
If you delete an assigned address the mainAddress__id of the customer table - e.g. "object_customer".mainAddress__id won't be resettet. The now invalid id of the address stays in the database.

@weisswurstkanone

This comment has been minimized.

Copy link
Contributor

@weisswurstkanone weisswurstkanone commented Nov 5, 2019

Unable to reproduce.

Procedure:

  • delete target
  • check sanitycheck table, entry for source object is there (resolved via dependencies table)
  • run maintenance script
  • relation is gone
@ckogler-elements

This comment has been minimized.

Copy link
Contributor Author

@ckogler-elements ckogler-elements commented Nov 6, 2019

Hmmm.... seems to be a Pimcore 5.8.6 issue. In Picmore 6 it works as described.
In Pimcore 5.8.6 the item is added to the sanitycheck table.

After executing php ~/www/bin/console pimcore:maintenance --job="runSanityCheck" -vvv the id is removed from the sanitycheck table, but not in the objcte_xxx table.

@weisswurstkanone

This comment has been minimized.

Copy link
Contributor

@weisswurstkanone weisswurstkanone commented Nov 7, 2019

Can this be reproduced (i.e. same behavior the second time) on your side ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.