Project

General

Profile

Revision 67861132

ID678611326d5c998df0432dfa1e4be9da9ed971f3
Parent 601b8e6e
Child bc08a1ea

Added by Katja Luther about 2 years ago

ref #7345: fix dao method to get entities with special marker and pattern in titleCache

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/IdentifiableDaoBase.java
657 657

  
658 658

  
659 659
        queryString += " AND mks.markerType = :type";
660
        if (pattern != null){
661
            queryString += " AND c.titleCache like :pattern";
662
            pattern = pattern.replace("*", "%");
663
            pattern = pattern.replace("?", "_");
664
            pattern = pattern + "%";
660 665

  
666
        }
661 667

  
662 668

  
663 669
        Query query = getSession().createQuery(queryString);
664

  
670
        if (pattern != null){
671
            query.setParameter("pattern", pattern);
672
        }
665 673
        //parameters
666 674
        query.setEntity("type", markerType);
667 675
        query.setMaxResults(limit);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)