Closed GoogleCodeExporter closed 8 years ago
actually not fixed with I add the class to hibernate... still sorting this one
out.
It happens when I try to search for everything from a GenericDao:
Search search = new Search();
search.addSort( new Sort( sortProperty, !sortAsc ) );
search.setFirstResult( query.getFrom() );
search.setMaxResults( query.getCount() );
SearchResult<T> res =_dao.searchAndCount( search );
Original comment by ryan...@gmail.com
on 27 Jan 2009 at 9:23
So, the problem came from adding a null sortProperty. adding:
if( sortProperty != null ) {
search.addSort( new Sort( sortProperty, !sortAsc ) );
}
fixed things for me.
Thought identical code worked for version 0.2...
Closing this issue is probbably fine. Or throw a more descriptive error in:
securityCheck()
thanks
ryan
Original comment by ryan...@gmail.com
on 27 Jan 2009 at 10:24
[deleted comment]
I agree we should add a more descriptive error.
Original comment by dwolvert
on 27 Jan 2009 at 10:35
Robust null checking has been implemented in version 0.4.2 according to the
following
rules...
*The field list may not contain null elements. A Fetch with a null property
returns
the root entity of the search.
*Null fetches are ignored.
*Null sorts are ignored. A sort with a null property sorts on the root entity
of the
search.
*Null filters are ignored. Filters with a null property refer to the root
entity of
the search.
Original comment by dwolvert
on 13 Mar 2009 at 4:19
Original issue reported on code.google.com by
ryan...@gmail.com
on 27 Jan 2009 at 9:17