Even in load() we can be without a where clause, for e.g. loading a count(*) style record.

This commit is contained in:
Par Winzell
2007-08-22 17:18:15 +00:00
parent 470c56d38c
commit b1cdca0595
@@ -43,7 +43,10 @@ public class FindOneQuery<T extends PersistentRecord>
{
_marsh = ctx.getMarshaller(type);
_select = new SelectClause<T>(type, _marsh.getFieldNames(), clauses);
_select.getWhereClause().validateQueryType(type); // sanity check
WhereClause where = _select.getWhereClause();
if (where != null) {
_select.getWhereClause().validateQueryType(type); // sanity check
}
_builder = ctx.getSQLBuilder(DepotTypes.getDepotTypes(ctx, _select));
_builder.newQuery(_select);
}