Closed GoogleCodeExporter closed 9 years ago
the above error just araises when I call dao.count(search) directly.
When I call indirectly (see snippet), it works:
@Override
public int count(ISearch search) {
// return dao.count(search);
SearchResult<T> searchResult = dao.searchAndCount(search);
return searchResult.getTotalCount();
}
As I need the count separate from the results, this workaround means executing
the search twice, which is a dirty solution.
But it shows that there is no general problem with my data or hibernate
mapping...
So it looks like a real issue.
Original comment by ralf.eic...@gmail.com
on 18 Nov 2010 at 6:57
[deleted comment]
I know it's been a while, but do you have any way of 1) getting us a way to
reproduce this error and/or 2) getting us the HQL query that is used by
searchAndCount (since this works and the HQL query you posted for just search
did not work, it would be helpful to contrast the two.)
Original comment by dwolvert
on 27 Feb 2011 at 11:04
the problem is solved: my fault. the table did not have a unique constraint and
therefore two identical entries were in table... so the result could not be
unique...
Original comment by ralf.eic...@gmail.com
on 8 Oct 2012 at 12:50
Thanks, ralf.eichinger. Issue closed.
Original comment by dwolvert
on 8 Oct 2012 at 3:01
Original issue reported on code.google.com by
ralf.eic...@gmail.com
on 17 Nov 2010 at 8:46