Entity dependency resolving in MolgenisModel fails in the following case:
Entity A extends B and entity A has field B
Example:
*** Remove field B from entity A
// entities added in import order ENTITIES_IMPORTABLE = new LinkedHashMap<String, EntityImporter>(); ENTITIES_IMPORTABLE.put("institute", new InstituteEntityImporter()); ENTITIES_IMPORTABLE.put("investigation", new InvestigationEntityImporter()); ENTITIES_IMPORTABLE.put("molgenisfile", new MolgenisFileEntityImporter()); ENTITIES_IMPORTABLE.put("runtimeproperty", new RuntimePropertyEntityImporter()); ENTITIES_IMPORTABLE.put("characteristic", new CharacteristicEntityImporter()); ENTITIES_IMPORTABLE.put("observationtarget", new ObservationTargetEntityImporter()); ENTITIES_IMPORTABLE.put("individual", new IndividualEntityImporter()); ENTITIES_IMPORTABLE.put("ontology", new OntologyEntityImporter()); ENTITIES_IMPORTABLE.put("species", new SpeciesEntityImporter()); ENTITIES_IMPORTABLE.put("genome", new GenomeEntityImporter()); ENTITIES_IMPORTABLE.put("chromosome", new ChromosomeEntityImporter()); ENTITIES_IMPORTABLE.put("gene", new GeneEntityImporter()); ENTITIES_IMPORTABLE.put("protein", new ProteinEntityImporter()); ENTITIES_IMPORTABLE.put("proteindomain", new ProteinDomainEntityImporter()); ENTITIES_IMPORTABLE.put("exon", new ExonEntityImporter()); ENTITIES_IMPORTABLE.put("ontologyterm", new OntologyTermEntityImporter()); ENTITIES_IMPORTABLE.put("accession", new AccessionEntityImporter()); ENTITIES_IMPORTABLE.put("person", new PersonEntityImporter()); ENTITIES_IMPORTABLE.put("study", new StudyEntityImporter()); ENTITIES_IMPORTABLE.put("citation", new CitationEntityImporter()); ENTITIES_IMPORTABLE.put("submission", new SubmissionEntityImporter()); ENTITIES_IMPORTABLE.put("contribution", new ContributionEntityImporter()); ENTITIES_IMPORTABLE.put("studydetails", new StudyDetailsEntityImporter()); ENTITIES_IMPORTABLE.put("phenotypeproperty", new PhenotypePropertyEntityImporter()); ENTITIES_IMPORTABLE.put("samplepanel", new SamplePanelEntityImporter()); ENTITIES_IMPORTABLE.put("assayedpanel", new AssayedPanelEntityImporter()); ENTITIES_IMPORTABLE.put("variant", new VariantEntityImporter()); ENTITIES_IMPORTABLE.put("observablefeature", new ObservableFeatureEntityImporter()); ENTITIES_IMPORTABLE.put("protocol", new ProtocolEntityImporter()); ENTITIES_IMPORTABLE.put("phenotypemethod", new PhenotypeMethodEntityImporter()); ENTITIES_IMPORTABLE.put("dataset", new DataSetEntityImporter()); ENTITIES_IMPORTABLE.put("panel", new PanelEntityImporter()); ENTITIES_IMPORTABLE.put("experiment", new ExperimentEntityImporter()); ENTITIES_IMPORTABLE.put("gwasexperiment", new GWASExperimentEntityImporter()); ENTITIES_IMPORTABLE.put("usedmarkerset", new UsedMarkerSetEntityImporter()); ENTITIES_IMPORTABLE.put("frequencycluster", new FrequencyClusterEntityImporter()); <-- field B ENTITIES_IMPORTABLE.put("genotypefrequency", new GenotypeFrequencyEntityImporter()); ENTITIES_IMPORTABLE.put("allelefrequency", new AlleleFrequencyEntityImporter()); ENTITIES_IMPORTABLE.put("significance", new SignificanceEntityImporter()); ENTITIES_IMPORTABLE.put("effectsize", new EffectSizeEntityImporter()); ENTITIES_IMPORTABLE.put("selectioncriteria", new SelectionCriteriaEntityImporter()); ENTITIES_IMPORTABLE.put("category", new CategoryEntityImporter()); ENTITIES_IMPORTABLE.put("observationset", new ObservationSetEntityImporter()); ENTITIES_IMPORTABLE.put("phenotypevalue", new PhenotypeValueEntityImporter()); ENTITIES_IMPORTABLE.put("observedvalue", new ObservedValueEntityImporter()); ENTITIES_IMPORTABLE.put("panelsource", new PanelSourceEntityImporter());
*** Keep field B in entity A
// entities added in import order ENTITIES_IMPORTABLE = new LinkedHashMap<String, EntityImporter>(); ENTITIES_IMPORTABLE.put("institute", new InstituteEntityImporter()); ENTITIES_IMPORTABLE.put("investigation", new InvestigationEntityImporter()); ENTITIES_IMPORTABLE.put("molgenisfile", new MolgenisFileEntityImporter()); ENTITIES_IMPORTABLE.put("runtimeproperty", new RuntimePropertyEntityImporter()); ENTITIES_IMPORTABLE.put("characteristic", new CharacteristicEntityImporter()); ENTITIES_IMPORTABLE.put("observationtarget", new ObservationTargetEntityImporter()); ENTITIES_IMPORTABLE.put("individual", new IndividualEntityImporter()); ENTITIES_IMPORTABLE.put("ontology", new OntologyEntityImporter()); ENTITIES_IMPORTABLE.put("species", new SpeciesEntityImporter()); ENTITIES_IMPORTABLE.put("genome", new GenomeEntityImporter()); ENTITIES_IMPORTABLE.put("chromosome", new ChromosomeEntityImporter()); ENTITIES_IMPORTABLE.put("gene", new GeneEntityImporter()); ENTITIES_IMPORTABLE.put("protein", new ProteinEntityImporter()); ENTITIES_IMPORTABLE.put("proteindomain", new ProteinDomainEntityImporter()); ENTITIES_IMPORTABLE.put("exon", new ExonEntityImporter()); ENTITIES_IMPORTABLE.put("ontologyterm", new OntologyTermEntityImporter()); ENTITIES_IMPORTABLE.put("accession", new AccessionEntityImporter()); ENTITIES_IMPORTABLE.put("person", new PersonEntityImporter()); ENTITIES_IMPORTABLE.put("study", new StudyEntityImporter()); ENTITIES_IMPORTABLE.put("citation", new CitationEntityImporter()); ENTITIES_IMPORTABLE.put("submission", new SubmissionEntityImporter()); ENTITIES_IMPORTABLE.put("contribution", new ContributionEntityImporter()); ENTITIES_IMPORTABLE.put("studydetails", new StudyDetailsEntityImporter()); ENTITIES_IMPORTABLE.put("phenotypeproperty", new PhenotypePropertyEntityImporter()); ENTITIES_IMPORTABLE.put("samplepanel", new SamplePanelEntityImporter()); ENTITIES_IMPORTABLE.put("assayedpanel", new AssayedPanelEntityImporter()); ENTITIES_IMPORTABLE.put("variant", new VariantEntityImporter()); ENTITIES_IMPORTABLE.put("observablefeature", new ObservableFeatureEntityImporter()); ENTITIES_IMPORTABLE.put("protocol", new ProtocolEntityImporter()); ENTITIES_IMPORTABLE.put("phenotypemethod", new PhenotypeMethodEntityImporter()); ENTITIES_IMPORTABLE.put("dataset", new DataSetEntityImporter()); ENTITIES_IMPORTABLE.put("panel", new PanelEntityImporter()); ENTITIES_IMPORTABLE.put("experiment", new ExperimentEntityImporter()); ENTITIES_IMPORTABLE.put("gwasexperiment", new GWASExperimentEntityImporter()); ENTITIES_IMPORTABLE.put("usedmarkerset", new UsedMarkerSetEntityImporter()); ENTITIES_IMPORTABLE.put("significance", new SignificanceEntityImporter()); ENTITIES_IMPORTABLE.put("effectsize", new EffectSizeEntityImporter()); ENTITIES_IMPORTABLE.put("selectioncriteria", new SelectionCriteriaEntityImporter()); ENTITIES_IMPORTABLE.put("category", new CategoryEntityImporter()); ENTITIES_IMPORTABLE.put("panelsource", new PanelSourceEntityImporter()); ENTITIES_IMPORTABLE.put("frequencycluster", new FrequencyClusterEntityImporter()); <-- field B at different position ENTITIES_IMPORTABLE.put("genotypefrequency", new GenotypeFrequencyEntityImporter()); ENTITIES_IMPORTABLE.put("allelefrequency", new AlleleFrequencyEntityImporter()); ENTITIES_IMPORTABLE.put("phenotypevalue", new PhenotypeValueEntityImporter()); ENTITIES_IMPORTABLE.put("observationset", new ObservationSetEntityImporter()); ENTITIES_IMPORTABLE.put("observedvalue", new ObservedValueEntityImporter());