|
|
|
@ -580,7 +580,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
|
|
|
|
|
@Override
|
|
|
|
|
public int listCount() {
|
|
|
|
|
try{
|
|
|
|
|
Long count = entityManager.createQuery("select count(model) from " + persistentClass.getName() + " as model",Long.class)
|
|
|
|
|
Long count = entityManager.createQuery("select count(0) from " + persistentClass.getName() + " as model", Long.class)
|
|
|
|
|
.getSingleResult();
|
|
|
|
|
return count == null ? 0 : count.intValue();
|
|
|
|
|
}catch(NoResultException e){
|
|
|
|
|