I am using 1.7-SNAPSHOT (latest build from develop) and when in remote mode
I try to create an index right after creating a class, I get an exception
that the class does not exist:
com.orientechnologies.orient.core.exception.OCommandExecutionException:
Class PERSON not found
at
com.orientechnologies.orient.core.sql.OCommandExecutorSQLCreateIndex.parse(OCommandExecutorSQLCreateIndex.java:101)
at
com.orientechnologies.orient.core.sql.OCommandExecutorSQLCreateIndex.parse(OCommandExecutorSQLCreateIndex.java:47)
at
com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:52)
at
com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:33)
at
com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:83)
at
com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:59)
at
com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1100)
at
com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:350)
at
com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:160)
This was invoked from the client using:
db.command(new OCommandSQL("CREATE INDEX idx-person-familyName ON
person (familyName) NOTUNIQUE")).execute(new Object[] {});
The class "person" was created using the code:
final OClassImpl sourceClass = (OClassImpl) ((OSchemaProxy)
db.getRawGraph().getMetadata().getSchema())
.createClassInternal(className, vertexClass, clusterIds);
sourceClass.saveInternal();
If I connect through the console and list the classes, the person class is
there. In tracking down why it does not find the class, the findClass
method of the
OCommandExecutorSQLCreateIndex class tries to lookup the class in OSchemaShared
but the class does not show up on the list.
So, it appears that the OSchemaShared list of classes is not updated within
the context of the connection maybe?
Seems like a bug to me but I wanted to make sure that I am not doing
something wrong using the API.
Thanks,
Odysseas
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.