Project

General

Profile

« Previous | Next » 

Revision 6dbfb2ec

Added by Andreas Kohlbecker over 7 years ago

ref #6087 adding orderINdex to TermDTO

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/description/DescriptionDaoImpl.java
923 923

  
924 924
            // NOTE can't use "select new TermDto(distinct a.uuid, r , a.vocabulary.uuid) since we will get multiple
925 925
            // rows for a term with multiple representations
926
            String parentAreasQueryStr = "select a.uuid, r, p.uuid, v.uuid "
926
            String parentAreasQueryStr = "select a.uuid, r, p.uuid, v.uuid, a.orderIndex "
927 927
                    + "from NamedArea as a LEFT JOIN a.partOf as p LEFT JOIN a.representations AS r LEFT JOIN a.vocabulary as v "
928 928
                    + "where a.id in (:allAreaIds) order by a.idInVocabulary";
929 929
            query = getSession().createQuery(parentAreasQueryStr);
......
959 959
                } else {
960 960
                    representations = (Set<Representation>)elements[1];
961 961
                }
962
                dtoMap.put(uuid, new TermDto(uuid, representations, (UUID)elements[2], (UUID)elements[3]));
962
                dtoMap.put(uuid, new TermDto(uuid, representations, (UUID)elements[2], (UUID)elements[3], (Integer)elements[4]));
963 963
            }
964 964
        }
965 965
        return new ArrayList<TermDto>(dtoMap.values());

Also available in: Unified diff