order by for keywords added
This commit is contained in:
parent
7bf171b4e8
commit
2658a51490
@ -94,9 +94,9 @@ public class KeywordDaoJPAImp extends LazyDeleteAbstractDaoJPAImp<Keyword> imple
|
|||||||
public List<Keyword> doInJpa(EntityManager em) throws PersistenceException {
|
public List<Keyword> doInJpa(EntityManager em) throws PersistenceException {
|
||||||
TypedQuery<Keyword> query;
|
TypedQuery<Keyword> query;
|
||||||
if(includeLazyDeleted)
|
if(includeLazyDeleted)
|
||||||
query = em.createQuery("SELECT x FROM "+domainClassString+" x WHERE x.type = :type", domainClass);
|
query = em.createQuery("SELECT x FROM "+domainClassString+" x WHERE x.type = :type ORDER BY keyword", domainClass);
|
||||||
else
|
else
|
||||||
query = em.createQuery("SELECT x FROM "+domainClassString+" x WHERE x.type = :type AND x.deleted = false", domainClass);
|
query = em.createQuery("SELECT x FROM "+domainClassString+" x WHERE x.type = :type AND x.deleted = false ORDER BY keyword", domainClass);
|
||||||
query.setParameter("type", keywordType);
|
query.setParameter("type", keywordType);
|
||||||
query.setHint(QueryHints.HINT_CACHEABLE, "true");
|
query.setHint(QueryHints.HINT_CACHEABLE, "true");
|
||||||
return query.getResultList();
|
return query.getResultList();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user