Hello
I want to use a field with EmbeddedSet value. In this field I want to put
Custom object ( If I use String it works fine)
Here my code
try
{
Vertex james = graph.addVertex("class:PersonGraph");
james.setProperty("name", "James");
TestObject testObject= new TestObject ();
testObject.setName("nameOfTestObject");
Set<TestObject > testObjects= new HashSet<>();
testObjects.add(testObject);
james.setProperty("testObjects",testObjects);
graph.commit();
}catch (OException e)
{
graph.rollback();
e.printStackTrace();
} finally {
graph.shutdown();
}
TestObject have only empty constructor and getter/setter on name field.
I have the following error :
com.orientechnologies.orient.core.exception.OTransactionException: Error on
transaction commit
at
com.orientechnologies.orient.client.remote.OStorageRemote.commitEntry(OStorageRemote.java:1978)
at
com.orientechnologies.orient.client.remote.OStorageRemote.commit(OStorageRemote.java:1100)
at
com.orientechnologies.orient.client.remote.OStorageRemoteThread.commit(OStorageRemoteThread.java:445)
at
com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:470)
at
com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:147)
at
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2370)
at
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2340)
at
com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:161)
at
com.axway.orientDB.node.graph.test.TestInsertGraph.main(TestInsertGraph.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by:
com.orientechnologies.orient.core.exception.OSerializationException:
Impossible serialize value of type class
com.orientechnologies.orient.core.db.record.OTrackedSet with the ODocument
binary serializer
at
com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.writeEmbeddedCollection(ORecordSerializerBinaryV0.java:721)
at
com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.writeSingleValue(ORecordSerializerBinaryV0.java:550)
at
com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.serialize(ORecordSerializerBinaryV0.java:255)
at
com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinary.toStream(ORecordSerializerBinary.java:104)
at
com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:2063)
at
com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:682)
at
com.orientechnologies.orient.client.remote.OStorageRemote.commitEntry(OStorageRemote.java:1972)
... 13 more
Using orientDB 2.0.1
Thks for your help
--
---
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.