Hi,
No it is not possible.

id is like uuid it can be only generated.


On Thu, Jun 5, 2014 at 5:22 PM, <[email protected]> wrote:

> Hello,
>
> code, throw exception
> "com.orientechnologies.orient.core.exception.ORecordNotFoundException:
> #3:989898"
> Is it possible to create a record with an arbitrary orid?
>
> ODatabaseDocument db = new ODatabaseDocumentTx("remote:localhost/docs").
> open("admin", "admin");
> ORecordId rid = new ORecordId("#" + db.getClusterIdByName("default") +
> ":989898");
> ODocument doc = new ODocument(rid);
> doc.field("name", "test");
> doc.save();
>
> full exception:
> Exception in thread "main" com.orientechnologies.orient.enterprise.channel
> .binary.OResponseProcessingException: Exception during response processing
> .
>  at com.orientechnologies.orient.enterprise.channel.binary.
> OChannelBinaryAsynchClient.throwSerializedException(
> OChannelBinaryAsynchClient.java:264)
>  at com.orientechnologies.orient.enterprise.channel.binary.
> OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:
> 231)
>  at com.orientechnologies.orient.enterprise.channel.binary.
> OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:
> 202)
>  at com.orientechnologies.orient.enterprise.channel.binary.
> OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:
> 113)
>  at com.orientechnologies.orient.client.remote.OStorageRemote.
> beginResponse(OStorageRemote.java:1952)
>  at com.orientechnologies.orient.client.remote.OStorageRemote.updateRecord
> (OStorageRemote.java:548)
>  at com.orientechnologies.orient.client.remote.OStorageRemoteThread.
> updateRecord(OStorageRemoteThread.java:257)
>  at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.save(
> ODatabaseRaw.java:274)
>  at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.
> executeSaveRecord(ODatabaseRecordAbstract.java:1012)
>  at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(
> OTransactionNoTx.java:82)
>  at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(
> ODatabaseRecordTx.java:333)
>  at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(
> ODatabaseRecordTx.java:308)
>  at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(
> ODatabaseRecordTx.java:42)
>  at com.orientechnologies.orient.core.record.ORecordAbstract.save(
> ORecordAbstract.java:328)
>  at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument
> .java:1374)
>  at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument
> .java:1359)
>  at CreateTest.main(CreateTest.java:12)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:62)
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:483)
>  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
> Caused by: com.orientechnologies.orient.core.exception.
> ORecordNotFoundException: #3:989898
>  at com.orientechnologies.orient.server.network.protocol.binary.
> OBinaryNetworkProtocolAbstract.updateRecord(OBinaryNetworkProtocolAbstract
> .java:351)
>  at com.orientechnologies.orient.server.network.protocol.binary.
> ONetworkProtocolBinary.updateRecord(ONetworkProtocolBinary.java:1466)
>  at com.orientechnologies.orient.server.network.protocol.binary.
> ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:294)
>  at com.orientechnologies.orient.server.network.protocol.binary.
> OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java
> :126)
>  at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:
> 45)
>
>  --
>
> ---
> 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.
>



-- 
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

-- 

--- 
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.

Reply via email to