--- /dev/null
+/**
+* Copyright (C) 2009 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.persistence.dao.initializer;
+
+import java.util.Optional;
+
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+
+/**
+ * Initializes the {@link Taxon#getTaxonNodes() taxonNodes}, which is required for
+ * @{link {@link Taxon#isMisapplicationOnly()},
+ * see https://dev.e-taxonomy.eu/redmine/issues/9797
+ * <p>
+ * <b>NOTE:</b> <code>Taxon.name</code> and <code>Taxon.sec</code> are initialized by the {@link TaxonNodeAutoInitializer}
+ * <p>
+ *
+ *
+ * @author a.kohlbecker
+ * @since 30.07.2010
+ */
+public class TaxonAutoInitializer extends AutoPropertyInitializer<Taxon> {
+
+ @Override
+ public void initialize(Taxon bean) {
+ beanInitializer.initializeInstance(bean.getTaxonNodes());
+ }
+
+ @Override
+ public Optional<String> hibernateFetchJoin(Class<?> clazz, String beanAlias){
+
+ String result = "";
+ result += String.format(" LEFT JOIN FETCH %s.taxonNodes tn ", beanAlias);
+ return Optional.of(result);
+ }
+
+}
\ No newline at end of file
<bean id="mediaAutoInitializer" class="eu.etaxonomy.cdm.persistence.dao.initializer.MediaAutoInitializer"></bean>
<bean id="typeDesignationAutoInitializer" class="eu.etaxonomy.cdm.persistence.dao.initializer.TypeDesignationAutoInitializer"></bean>
<bean id="teamAutoInitializer" class="eu.etaxonomy.cdm.persistence.dao.initializer.TeamAutoInitializer"></bean>
+ <bean id="taxonAutoInitializer" class="eu.etaxonomy.cdm.persistence.dao.initializer.TaxonAutoInitializer"></bean>
<bean id="defaultBeanInitializer" class="eu.etaxonomy.cdm.persistence.dao.initializer.AdvancedBeanInitializer">
<!--
"$",
"sources",
"statusNote",
- // taxon relations, see TaxonRelationshipBeanProcessor
- "relationsFromThisTaxon.toTaxon.taxonNodes",
- "relationsToThisTaxon.fromTaxon.taxonNodes",
+ "relationsFromThisTaxon.toTaxon.secSource.citation.authorship",
+ "relationsFromThisTaxon.toTaxon.secSource.citation.inReference.authorship",
+ "relationsToThisTaxon.fromTaxon.secSource.citation.authorship",
+ "relationsToThisTaxon.fromTaxon.secSource.citation.inReference.authorship",
// the name
"name.$",
"name.nomenclaturalSource.citation.authorship",