Author: toad
Date: 2008-07-17 22:26:35 +0000 (Thu, 17 Jul 2008)
New Revision: 21201
Modified:
branches/db4o/freenet/src/freenet/node/fcp/FCPPersistentRoot.java
Log:
Use and() here.
Modified: branches/db4o/freenet/src/freenet/node/fcp/FCPPersistentRoot.java
===================================================================
--- branches/db4o/freenet/src/freenet/node/fcp/FCPPersistentRoot.java
2008-07-17 22:21:51 UTC (rev 21200)
+++ branches/db4o/freenet/src/freenet/node/fcp/FCPPersistentRoot.java
2008-07-17 22:26:35 UTC (rev 21201)
@@ -5,6 +5,7 @@
import com.db4o.ObjectContainer;
import com.db4o.ObjectSet;
+import com.db4o.query.Constraint;
import com.db4o.query.Predicate;
import com.db4o.query.Query;
@@ -57,7 +58,8 @@
query.constrain(FCPClient.class);
// Don't constrain by root because that set is huge.
// I think that was the cause of the OOMs here...
- query.descend("name").constrain(name);
+ Constraint con = query.descend("name").constrain(name);
+ con.and(query.descend("root").constrain(this).identity());
ObjectSet set = query.execute();
while(set.hasNext()) {
FCPClient client = (FCPClient) set.next();