Project

General

Profile

Revision 2a95430a

ID2a95430a17f375aa80597a226cfe878436e5e8ad
Parent 5bdaf8c0
Child d4e06699

Added by Andreas Müller over 3 years ago

ref #7478 fix pro parte synonym search in taxon hql search (still untested)

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/TaxonDaoHibernateImpl.java
322 322
                Classification classification, MatchMode matchMode, Set<NamedArea> namedAreas,
323 323
                NameSearchOrder order, boolean doCount, boolean returnIdAndTitle){
324 324

  
325
            boolean doProParteSynonyms = doSynonyms;  //we may distinguish in future
325 326
            if (order == null){
326 327
                order = NameSearchOrder.DEFAULT();
327 328
            }
......
403 404
                }
404 405
                synonymIDs = subSynonym.list();
405 406
            }
406
            if (doIncludeMisappliedNames ){
407
            if (doIncludeMisappliedNames || doProParteSynonyms ){
407 408
                subMisappliedNames = getSession().createQuery(misappliedSelect).setParameter("queryString", hqlQueryString);
408 409
                Set<TaxonRelationshipType> relTypeSet = new HashSet<>();
409
                relTypeSet.add(TaxonRelationshipType.MISAPPLIED_NAME_FOR());
410
                relTypeSet.add(TaxonRelationshipType.PRO_PARTE_MISAPPLIED_NAME_FOR());
410
                if (doIncludeMisappliedNames){
411
                    relTypeSet.addAll(TaxonRelationshipType.allMisappliedNameTypes());
412
                }
413
                if (doProParteSynonyms){
414
                    relTypeSet.addAll(TaxonRelationshipType.allSynonymTypes());
415
                }
411 416
                subMisappliedNames.setParameterList("rTypeSet", relTypeSet);
412 417
                if(doAreaRestriction){
413 418
                    subMisappliedNames.setParameterList("namedAreasUuids", namedAreasUuids);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)