Permalink
Browse files

Merge pull request #175 from Orient-Technologies/master

Updates for OrientDB 1.0rc6 - Thanks Luca.
  • Loading branch information...
2 parents d099b98 + dd90a8f commit aa9d837c4167ae06598fb5052def9048239e25a6 @okram okram committed Oct 11, 2011
@@ -22,12 +22,12 @@
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-core</artifactId>
- <version>1.0rc5</version>
+ <version>1.0rc6</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orient-commons</artifactId>
- <version>1.0rc5</version>
+ <version>1.0rc6</version>
</dependency>
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
@@ -433,6 +433,7 @@ private OrientGraphContext openOrCreate(final boolean createDefaultIndices) {
this.threadContext.set(context);
context.rawGraph = new OGraphDatabase(url);
+ context.rawGraph.setUseCustomTypes(false);
if (url.startsWith("remote:") || context.rawGraph.exists()) {
context.rawGraph.open(username, password);
@@ -1,9 +1,13 @@
package com.tinkerpop.blueprints.pgm.impls.orientdb;
+import java.util.Collection;
+import java.util.Collections;
+
import com.orientechnologies.orient.core.db.record.OIdentifiable;
import com.orientechnologies.orient.core.index.OIndex;
import com.orientechnologies.orient.core.index.OIndexTxAwareMultiValue;
-import com.orientechnologies.orient.core.metadata.schema.OProperty;
+import com.orientechnologies.orient.core.index.OSimpleKeyIndexDefinition;
+import com.orientechnologies.orient.core.metadata.schema.OClass;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.ORecord;
import com.orientechnologies.orient.core.record.impl.ODocument;
@@ -17,9 +21,6 @@
import com.tinkerpop.blueprints.pgm.impls.WrappingCloseableSequence;
import com.tinkerpop.blueprints.pgm.impls.orientdb.util.OrientElementSequence;
-import java.util.Collection;
-import java.util.Collections;
-
/**
* @author Luca Garulli (http://www.orientechnologies.com)
*/
@@ -138,11 +139,14 @@ protected void removeElement(final T vertex) {
}
private void create(final String indexName, final Class<? extends Element> indexClass,
- final com.tinkerpop.blueprints.pgm.Index.Type indexType, final OType iKeyType) {
+ final com.tinkerpop.blueprints.pgm.Index.Type indexType, OType iKeyType) {
this.indexClass = indexClass;
+ if( iKeyType == null )
+ iKeyType = OType.STRING;
+
// CREATE THE MAP
- this.underlying = new OIndexTxAwareMultiValue(graph.getRawGraph(), (OIndex<Collection<OIdentifiable>>) graph.getRawGraph().getMetadata().getIndexManager().createIndex(indexName, OProperty.INDEX_TYPE.NOTUNIQUE.toString(), iKeyType, null, null, null, true));
+ this.underlying = new OIndexTxAwareMultiValue(graph.getRawGraph(), (OIndex<Collection<OIdentifiable>>) graph.getRawGraph().getMetadata().getIndexManager().createIndex(indexName, OClass.INDEX_TYPE.NOTUNIQUE.toString(),new OSimpleKeyIndexDefinition(iKeyType), null, null));
final String className;
if (Vertex.class.isAssignableFrom(indexClass))

0 comments on commit aa9d837

Please sign in to comment.