Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Connection index loss during accessor constructing #88

Closed
SudoBobo opened this issue Mar 16, 2018 · 2 comments
Closed

Connection index loss during accessor constructing #88

SudoBobo opened this issue Mar 16, 2018 · 2 comments
Labels
archived bug Something isn't working wontfix This will not be worked on

Comments

@SudoBobo
Copy link
Contributor

SudoBobo commented Mar 16, 2018

Our current formats of connections (both simple and union) have 'index_name' field representing the index that should be used in fetching data from destination collection. In some cases this index is lost during accessor constructing (in accessor_general/build_connection_indexes):

    for collection_name, collection in pairs(collections) do
        for _, c in ipairs(collection.connections) do
            connection_indexes[c.destination_collection][c.name] = set_connection_index(...)

Here is the case: consider A → C and B → C connections with the same names. Only last one will be saved in the connection_indexes structure and A → C connection can fail during execution.
Another case is when different variants (in union connection) points to the same destination collection.

    for collection_name, collection in pairs(collections) do
        for _, c in ipairs(collection.connections) do
            for _, v in ipairs(c.variants) do
                connection_indexes[v.destination_collection][c.name] = set_connection_index(...)
@SudoBobo SudoBobo added bug Something isn't working prio2 labels Mar 16, 2018
@SudoBobo SudoBobo changed the title Connection index loss Connection index loss during accessor constructing Mar 16, 2018
Totktonada pushed a commit that referenced this issue Mar 16, 2018
Fixes #8.

Backlog / related: #84, #85, #86, #88, #89 + some refactoring / code
deduplication.
@Totktonada
Copy link
Member

Dupe of #70?

@Totktonada
Copy link
Member

I'm going to archive the repository. I'll proceed as follows:

  • Mark all open pull requests with the archived label and close.
  • Mark all open issues with archived and wontfix labels and close.
  • Archive the repository.

Consider the following projects:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants