Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-02-20 11:35:13 +0000
committerEike Stepper2011-02-20 11:35:13 +0000
commit6743c5b639b00ecb2eaf99c5aebbfa737e37a3a4 (patch)
tree1e6d9fd3ec8ee579aaedec736792919eef0db0aa /plugins/org.eclipse.emf.cdo.server.mongodb
parentab6ed349166641f9b74734461b66c495a1ba2464 (diff)
downloadcdo-6743c5b639b00ecb2eaf99c5aebbfa737e37a3a4.tar.gz
cdo-6743c5b639b00ecb2eaf99c5aebbfa737e37a3a4.tar.xz
cdo-6743c5b639b00ecb2eaf99c5aebbfa737e37a3a4.zip
[337152] [Mongo] Create a MongoDBStore
https://bugs.eclipse.org/bugs/show_bug.cgi?id=337152
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.mongodb')
-rw-r--r--plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/MongoDBStore.java1
2 files changed, 3 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java
index 19e5d1428d..b281e0dfa7 100644
--- a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java
+++ b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java
@@ -60,6 +60,7 @@ import com.mongodb.QueryOperators;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import java.util.regex.Pattern;
/**
* @author Eike Stepper
@@ -421,7 +422,7 @@ public class Commits extends Coll
}
else
{
- query.put(REVISIONS + "." + "name", new BasicDBObject("$regex", "/^" + name + "/"));
+ query.put(REVISIONS + "." + "name", Pattern.compile("^" + name));
}
new Revisions<Boolean>(query)
diff --git a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/MongoDBStore.java b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/MongoDBStore.java
index 2ce42e39b0..029a39dbcf 100644
--- a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/MongoDBStore.java
+++ b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/MongoDBStore.java
@@ -44,6 +44,7 @@ import java.util.Set;
* <ul>
* <li>Are indexes always unique? Do unique indexes exist?
* <li>Are <code>_id</code> fields in embedded objects automatically indexed?
+ * <li>Ensure indexes: cdo_class, (cdo_branch/cdo_version)?
* <li>Remove skipMongo()
* </ul>
*

Back to the top