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

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2206 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
zell
2007-08-22 17:18:15 +00:00
parent 3bc33872c5
commit 5b22ae2d69
@@ -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);
}