I am using Orientdb 2.2.10.
What I want to achieve?
I want to get a vertex of a particular vertexType - e.g vertexType = 'Person'.
My graphdb is indexed with unique key('uid').
What I am doing to achieve it?
what is problem with this method? :-
e.g:-
I want to get a vertex of vertextype = 'Person' having uid = 'ram'
I am getting this vertex even when I provide any label (e.g "Relation") which is present in database.
Is this a bug or I am doing something wrong?
Thanks..!
I replicated your structure.
I have tried with this code
String [] keys=new String[]{"uid"};
String [] values=new String[]{"ram"};
Iterable<Vertex> it= g.getVertices("Person", keys, values);
for(Vertex v:it){
System.out.println(v.getId());
System.out.println(v.getProperty("uid"));
}
and I obtained
#21:0 ram
while with
String [] keys=new String[]{"uid"};
String [] values=new String[]{"ram"};
Iterable<Vertex> it= g.getVertices("Relational", keys, values);
for(Vertex v:it){
System.out.println(v.getId());
System.out.println(v.getProperty("uid"));
}
I got nothing.
Hope it helps.