Created
February 25, 2014 12:06
-
-
Save fabriziofortino/9207660 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final OrientGraph graph = new OrientGraph("remote:localhost/mydb", "admin", "admin"); | |
OrientVertex v1 = graph.addVertex("class:TestVertex"); | |
OrientVertex v2 = graph.addVertex("class:TestVertex"); | |
OrientVertex v3 = graph.addVertex("class:TestVertex"); | |
OrientVertex v4 = graph.addVertex("class:TestVertex"); | |
Map<String, Object> p1 = new HashMap<String, Object>(); | |
p1.put("based_on", "0001"); | |
OrientEdge e1 = v1.addEdge(null, v2, "TestEdge", null, p1); | |
e1.save(); | |
Map<String, Object> p2 = new HashMap<String, Object>(); | |
p2.put("based_on", "0002"); | |
OrientEdge e2 = v3.addEdge(null, v4, "TestEdge", null, p2); | |
e2.save(); | |
graph.commit(); | |
graph.command(new OCommandSQL("delete edge TestEdge where based_on = '0001'")).execute(); | |
graph.shutdown(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've create this test case and works