Table.selectAll() is used when data from multiple tables is composed into

a single object. Table.select() is what is used when there's a one to one
table to object mapping. The All in select all should not be confused with
"" as the where clause which causes "all" records to be selected from the
table. While querying by example also works, it does unnecessary work.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1228 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2003-09-19 21:13:37 +00:00
parent 780efcb158
commit 23ee279609
@@ -1,5 +1,5 @@
// //
// $Id: UserRepository.java,v 1.31 2003/09/19 19:48:09 eric Exp $ // $Id: UserRepository.java,v 1.32 2003/09/19 21:13:37 mdb Exp $
// //
// samskivert library - useful routines for java programs // samskivert library - useful routines for java programs
// Copyright (C) 2001 Michael Bayne // Copyright (C) 2001 Michael Bayne
@@ -347,15 +347,13 @@ public class UserRepository extends JORARepository
public Object invoke (Connection conn, DatabaseLiaison liaison) public Object invoke (Connection conn, DatabaseLiaison liaison)
throws PersistenceException, SQLException throws PersistenceException, SQLException
{ {
Cursor c = _stable.queryByExample(new Site()); Cursor c = _stable.select("");
Iterator itr = c.toArrayList().iterator(); Iterator itr = c.toArrayList().iterator();
while (itr.hasNext()) { while (itr.hasNext()) {
Site site = (Site)itr.next(); Site site = (Site)itr.next();
_siteIdToSite.put(site.siteId, site); _siteIdToSite.put(site.siteId, site);
_siteNameToSite.put(site.stringId, site); _siteNameToSite.put(site.stringId, site);
} }
return null; return null;
} }
}); });