Giter Club home page Giter Club logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 21, 2024
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 [email protected] on 27 Jan 2009 at 9:23

from hibernate-generic-dao.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 21, 2024
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 [email protected] on 27 Jan 2009 at 10:24

from hibernate-generic-dao.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 21, 2024
[deleted comment]

from hibernate-generic-dao.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 21, 2024
I agree we should add a more descriptive error.

Original comment by dwolvert on 27 Jan 2009 at 10:35

from hibernate-generic-dao.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 21, 2024
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

  • Changed title: Check for null values in search params
  • Changed state: Fixed

from hibernate-generic-dao.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.