Skip to content

Relations dictionary to order tables #35

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

frederik5480
Copy link
Contributor

We might be able to make a default implementation like this that takes a dictionary and orders things properly, but for now I have put it as a provider specific implementation to get some thoughts.

In general I would like some feedback on this sort of way of doing it - it requires changes in the BaseProvider (hence this would bump the dependencies to 10.4.0 and should not be merged till we actually make a release with those new additions)

I do realize that if we have a dependency that says table C has a foreign key to B and B has a foreign key to A, then A should always be first, but in this implementation that is not considered as there is no relations that goes like that, only 1 step down.

…en sort accordingly to that. We might be able to make a default implementation like this that takes a dictionary and orders things properly, but for now I have put it as a provider specific implementation to get some thoughts.
@frederik5480 frederik5480 marked this pull request as draft April 24, 2024 08:15
Copy link
Contributor

@DWDBE DWDBE left a comment

Choose a reason for hiding this comment

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

Looks good, but there are still some tables that are missed:

{ "EcomVariantsOptions", [ "EcomLanguages" ]},
{ "EcomPrices", [ "EcomLanguages" ]},

Also we need to stick to the order of how it was before so EcomVariantGroups needs to be first/before the EcomProducts table as there are virtual columns in the EcomProducts/(and some other tables) that are used and trying to perform the search for the ids in the DataTables that are filled during the import to have correct references found by name/etc

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

Successfully merging this pull request may close these issues.

2 participants