Changeset 1940

Show
Ignore:
Timestamp:
24-06-11 15:41:41 (3 years ago)
Author:
robert@…
Message:

Bugfix for querying without criteria

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/groovy/dbnp/query/Search.groovy

    r1917 r1940  
    169169                 
    170170                // Generate where clause 
    171                 def whereClause = " WHERE "; 
     171                def whereClause = ""; 
    172172                if( fullHQL.where ) { 
    173173                        whereClause += " ( " + fullHQL.where.join( " " + searchMode.toString() + " "  ) + " ) " 
     
    190190                 
    191191                // Combine all parts to generate a full HQL query 
    192                 def hqlQuery = selectClause + " " + fullHQL.from + whereClause; 
     192                def hqlQuery = selectClause + " " + fullHQL.from + ( whereClause ? " WHERE " + whereClause : "" ); 
    193193                 
    194194                // Find all objects