From 23ee2796094770f0c6ac2c809dd6a1b09818da75 Mon Sep 17 00:00:00 2001 From: mdb Date: Fri, 19 Sep 2003 21:13:37 +0000 Subject: [PATCH] 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 --- .../java/com/samskivert/servlet/user/UserRepository.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/servlet/user/UserRepository.java b/projects/samskivert/src/java/com/samskivert/servlet/user/UserRepository.java index f41d9fd1..f2da969c 100644 --- a/projects/samskivert/src/java/com/samskivert/servlet/user/UserRepository.java +++ b/projects/samskivert/src/java/com/samskivert/servlet/user/UserRepository.java @@ -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 // Copyright (C) 2001 Michael Bayne @@ -347,15 +347,13 @@ public class UserRepository extends JORARepository public Object invoke (Connection conn, DatabaseLiaison liaison) throws PersistenceException, SQLException { - Cursor c = _stable.queryByExample(new Site()); - + Cursor c = _stable.select(""); Iterator itr = c.toArrayList().iterator(); while (itr.hasNext()) { Site site = (Site)itr.next(); _siteIdToSite.put(site.siteId, site); _siteNameToSite.put(site.stringId, site); } - return null; } });