Revision f134a838
Added by Katja Luther almost 2 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/DescriptiveDataSetService.java | ||
---|---|---|
491 | 491 |
@Override |
492 | 492 |
public DescriptionBaseDto getTaxonDescriptionForDescriptiveDataSetAndType(DescriptiveDataSetBaseDto dataSet, UUID taxonUuid, DescriptionType descriptionType){ |
493 | 493 |
Session session = getSession(); |
494 |
String queryString = "SELECT d.uuid FROM DescriptiveDataSet a JOIN a.descriptions as d JOIN d.taxon t WHERE t.uuid = :taxonuuid AND a.uuid = :dataSetUuid";// and d.type = :descriptionType";
|
|
494 |
String queryString = "SELECT d.uuid FROM DescriptiveDataSet a JOIN a.descriptions as d JOIN d.taxon t WHERE t.uuid = :taxonuuid AND a.uuid = :dataSetUuid and :descriptionType IN d.types";
|
|
495 | 495 |
|
496 | 496 |
Query query; |
497 | 497 |
query = session.createQuery(queryString); |
498 | 498 |
query.setParameter("taxonuuid", taxonUuid); |
499 | 499 |
query.setParameter("dataSetUuid", dataSet.getUuid()); |
500 |
// query.setParameter("descriptionType", descriptionType);
|
|
500 |
query.setParameter("descriptionType", descriptionType.getKey());
|
|
501 | 501 |
|
502 | 502 |
@SuppressWarnings("unchecked") |
503 | 503 |
List<UUID> result = query.list(); |
Also available in: Unified diff
ref #10084: add type comparison to hql again