Already answered on Stack Overflow: http://stackoverflow.com/questions/38650067/orientdb-setting-conflictstrategy-throwing-an-exception/38651248#38651248
Best Regards, Luca Garulli Founder & CEO OrientDB LTD <http://orientdb.com/> Want to share your opinion about OrientDB? Rate & review us at Gartner's Software Review <https://www.gartner.com/reviews/survey/home> On 29 July 2016 at 00:10, Mikayel Nersisyan <[email protected]> wrote: > I have OObjectDatabaseTx. I want to set my own conflict strategy using api. > > OObjectDatabaseTx db; > db.setConflictStrategy(new ORecordConflictStrategy() { > @Override > public byte[] onUpdate(OStorage storage, byte iRecordType, > ORecordId rid, ORecordVersion iRecordVersion, byte[] iRecordContent, > ORecordVersion iDatabaseVersion) { > <implementation>; > } > > @Override > public String getName() { > return "SOME NAME"; > } > }); > > On execution i'm getting an exception sarying that operation is not > supported. > > 10:40:48,718 INFO > [com.ats.vis.services.transaction.TransactionManager] > (TransactionExecutor[UML]) [__MAIN_WS__] ERROR:: > java.lang.UnsupportedOperationException: setConflictStrategy > at > com.orientechnologies.orient.client.remote.OStorageRemoteThread.setConflictStrategy(OStorageRemoteThread.java:318) > [orientdb-client-2.1.19.jar:2.1.19] > at > com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.setConflictStrategy(ODatabaseDocumentTx.java:1122) > [orientdb-core-2.1.19.jar:2.1.19] > at > com.orientechnologies.orient.object.db.OObjectDatabaseTx.setConflictStrategy(OObjectDatabaseTx.java:760) > [orientdb-object-2.1.19.jar:2.1.19] > > Is there any way to set conflict strategy? > > -- > > --- > 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. > -- --- 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.
