Project

General

Profile

Revision 30451d3c

ID30451d3cd027497576ee106c435c62d4b5021e9a
Parent a14ebae1
Child ed506dcb

Added by Andreas Müller almost 3 years ago

fix #6089 Remove taxonomicParentCache and taxonomicChildrenCount from Taxon

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/Taxon.java
22 22

  
23 23
import javax.persistence.Entity;
24 24
import javax.persistence.FetchType;
25
import javax.persistence.ManyToOne;
26 25
import javax.persistence.OneToMany;
27 26
import javax.persistence.Transient;
28 27
import javax.validation.Valid;
......
158 157
    public boolean isExcluded() {return excluded;}
159 158
    public void setExcluded(boolean excluded) {this.excluded = excluded;}
160 159

  
161

  
162
    // shortcut to the taxonomicIncluded (parent) taxon. Managed by the taxonRelations setter
163
    @XmlElement(name = "TaxonomicParentCache")
164
    @XmlIDREF
165
    @XmlSchemaType(name = "IDREF")
166
    @ManyToOne(fetch = FetchType.LAZY)
167
    @Deprecated //will be removed in future versions. Use Classification/TaxonNode instead
168
    private Taxon taxonomicParentCache;
169

  
170

  
171 160
    @XmlElementWrapper(name = "taxonNodes")
172 161
    @XmlElement(name = "taxonNode")
173 162
    @XmlIDREF
......
177 166
    @IndexedEmbedded
178 167
    private Set<TaxonNode> taxonNodes = new HashSet<TaxonNode>();
179 168

  
180
    //cached number of taxonomic children
181
    @XmlElement(name = "TaxonomicChildrenCount")
182
    @Deprecated //will be removed in future versions. Use Classification/TaxonNode instead
183
    private int taxonomicChildrenCount;
184

  
185 169
// ************************* FACTORY METHODS ********************************/
186 170

  
187 171
    /**
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v40_41/SchemaUpdater_40_41.java
168 168
        //update PresenceAbsenceTerm symbols
169 169
        updatePresenceAbsenceTermSymbols(stepList);
170 170

  
171
        //6089
172
        //Remove taxonomicParentCache from Taxon
173
        stepName = "Remove taxonomicParentCache from Taxon";
174
        tableName = "TaxonBase";
175
        oldColumnName = "taxonomicParentCache";
176
        step = ColumnRemover.NewInstance(stepName, tableName, oldColumnName, INCLUDE_AUDIT);
177
        stepList.add(step);
178

  
179
        //6089
180
        //Remove taxonomicChildrenCount from Taxon
181
        stepName = "Remove taxonomicChildrenCount from Taxon";
182
        tableName = "TaxonBase";
183
        oldColumnName = "taxonomicChildrenCount";
184
        step = ColumnRemover.NewInstance(stepName, tableName, oldColumnName, INCLUDE_AUDIT);
185
        stepList.add(step);
186

  
171 187
        return stepList;
172 188

  
173 189
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)