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

ChadoIdSpace/ChadoVocabulary Missing Values #1354

Open
spficklin opened this issue Jun 28, 2022 · 0 comments
Open

ChadoIdSpace/ChadoVocabulary Missing Values #1354

spficklin opened this issue Jun 28, 2022 · 0 comments
Labels
bug - confirmed For issues where a core developer has confirmed a bug exists. Group 1 - Tripal Content Types | Terms | Fields Any issue relating to Tripal Content including types, terms, and fields.

Comments

@spficklin
Copy link
Member

spficklin commented Jun 28, 2022

If the user creates a Vocabulary or IDSpace it will automatically add the records to the tripal_vocabulary_collection table. This in turn will call ChadoIdSpace::create() and ChadoVocabulary::create() function respectively and those will add the appropriate record to the cv and db tables of Chado. However, if for some reason the cv or db records get deleted outside of Tripal ( for example the Chado schema is dropped and recreated) then the ChadoIdSpace and ChadoVocabulary plugins can't get a record so the getters return nothing.

The current way to test if an IDspace or Vocabulary exists is to call the loadCollection function for the plugin manager. If it does not return NULL then we know the collection exists. For example:

    $idsmanager = \Drupal::service('tripal.collection_plugin_manager.idspace');
    $idSpace = $idsmanager->loadCollection($name, 'chado_id_space');
    if (!$idSpace) {
      $idSpace = $idsmanager->createCollection($name, 'chado_id_space');
    }

Can we add a new TripalCollectionPluginInterface::load function that can be called with the loadCollection function is called and allow the plugin to report if the collection exists internally and if not return NULL so it can be recreatd?

@laceysanderson laceysanderson transferred this issue from tripal/t4d8 Dec 7, 2022
@laceysanderson laceysanderson added bug - confirmed For issues where a core developer has confirmed a bug exists. Tripal 4 Group 1 - Tripal Content Types | Terms | Fields Any issue relating to Tripal Content including types, terms, and fields. labels Dec 7, 2022
@spficklin spficklin added this to the 4.0-alpha2 milestone Jan 30, 2023
@laceysanderson laceysanderson modified the milestones: 4.0-alpha2, 4.0-alpha3 Apr 21, 2023
@spficklin spficklin removed this from the 4.0-alpha3 milestone Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - confirmed For issues where a core developer has confirmed a bug exists. Group 1 - Tripal Content Types | Terms | Fields Any issue relating to Tripal Content including types, terms, and fields.
Projects
None yet
Development

No branches or pull requests

3 participants