Hi,
try this code
OrientGraph g=new OrientGraph(currentPath);
Iterable<Vertex> result=g.command(new OSQLSynchQuery<Vertex>("SELECT FROM
(SELECT y,x,MIN(@rid),COUNT(*) as cnt FROM l0 GROUP BY y,x) WHERE cnt > 1
LIMIT 1000 ")).execute();
for(Vertex v:result){
String x=v.getProperty("x");
String y=v.getProperty("y");
OrientVertex min=v.getProperty("MIN");
String id=min.getId().toString();
String query="Delete vertex L0 where ( @rid <> " + id + " and x='"+ x + "'
and y='" + y +"')";
g.command(new OCommandSQL(query)).execute();
}
g.shutdown();
Alessandro
--
---
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.