Project

General

Profile

Revision f4935a73

IDf4935a73271dc25cb0463cb458f3cf27161241e7
Parent 616de8d6
Child 43cd5dcc

Added by Katja Luther 3 months ago

avoid multiple representation exception for source

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/TaxonNodeServiceImpl.java
77 77
import eu.etaxonomy.cdm.model.term.DefinedTerm;
78 78
import eu.etaxonomy.cdm.persistence.dao.common.Restriction;
79 79
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
80
import eu.etaxonomy.cdm.persistence.dao.reference.IOriginalSourceDao;
80 81
import eu.etaxonomy.cdm.persistence.dao.taxon.ITaxonNodeDao;
81 82
import eu.etaxonomy.cdm.persistence.dao.taxon.ITaxonNodeFilterDao;
82 83
import eu.etaxonomy.cdm.persistence.dto.MergeResult;
......
114 115
    private INameService nameService;
115 116

  
116 117
    @Autowired
117
    private IReferenceService refService;
118
    private IOriginalSourceDao sourceDao;
119

  
118 120

  
119 121
    @Autowired
120 122
    private ITaxonNodeFilterDao nodeFilterDao;
......
181 183

  
182 184
    @Override
183 185
    public List<TaxonNodeDto> getUuidAndTitleCache(Integer limit, String pattern, UUID classificationUuid) {
184
        return dao.getUuidAndTitleCache(limit, pattern, classificationUuid);
186
        return dao.getUuidAndTitleCache(limit, pattern, classificationUuid, true);
185 187
    }
186 188

  
187 189
    @Override
......
850 852
       TaxonNode child = null;
851 853
       Reference ref = null;
852 854
       if (source != null){
855
           if (source.isPersited()){
856
               source = (DescriptionElementSource) sourceDao.load(source.getUuid());
857
           }
853 858
           if (source.getCitation() != null){
854 859
               source.setCitation(referenceService.load(source.getCitation().getUuid()));
855 860
           }
......
998 1003
        TreeIndex subTreeIndex = null;
999 1004
        Reference newSec = null;
1000 1005
        if (config.getNewSecundum() != null){
1001
            newSec = refService.load(config.getNewSecundum().getUuid());
1006
            newSec = referenceService.load(config.getNewSecundum().getUuid());
1002 1007
        }
1003 1008

  
1004 1009
        if (config.getSubtreeUuid() == null){

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)