I really appreciate your response. Your advice solved my problem and opened my mind. First I added document to same Db with graph to GraphDb. First I tried your advice and I write code it works. After than I realized that I don't need ODatabaseDocumentTx for committing documents I just try OrientGraph instance and it persists both document and vertice. I succeed atomic operation which includes graph operation and document operation. You can see at Second Code Fragment.
Thank you again.
------------------------------------First--------------------------------------------------------------------------------------------------------------------------
OrientGraphFactory factory = new OrientGraphFactory("remote:localhost/GratefulDeadConcerts","root","root").setupPool(1,10);
db = factory.getTx();
documentDb = db.getRawGraph();
db.addVertex("class:Person", "name", "Sezer", "age", 33, "city", "Rome", "born", "Victoria, TX");
documentDb.getTransaction().begin();
ODocument doc = new ODocument("PersonExtended");
doc.field( "name", "Sezer" );
doc.field( "sml", 33 );
doc.save();
db.commit();
-------------------------------Second-------------------------------------------------------------
OrientGraphFactory factory = new OrientGraphFactory("remote:localhost/GratefulDeadConcerts","root","root").setupPool(1,10);
db = factory.getTx();
db.addVertex("class:Person", "name", "Ahmet", "age", 33, "city", "Rome", "born", "Victoria, TX");
ODocument doc = new ODocument("PersonExtended");
doc.field( "name", "Ahmet" );
doc.field( "sml", 33 );
doc.save();
db.commit();
16 Mart 2015 Pazartesi 23:09:44 UTC+2 tarihinde Colin yazdı: