OrientGraphNoTx graph = factory.getNoTx();
try {
String query = "INSERT INTO SuperMarket (Item,Code,Quantity) VALUES('banana',12.33,50)";
graph.command(new OCommandSQL(query).execute());
graph.commit();
} catch (Exception e) {
graph.rollback();
System.out.println(e);
} finally {
graph.shutdown();
}
I am getting exception but the query is executed(data inserted)
why its committed rather than rollback()
but actual query is graph.command(new OCommandSQL(query)).execute();
please help me any one (I am connecting at remote db)
graph.command(new OCommandSQL(query).execute());
graph.command(new OCommandSQL(query)).execute();