linus
linus

Reputation: 75

getvertices with multiple keys,values is not working

I am facing some issue with getVertices function

on calling get vertices function, I am getting empty result even though I have data

Iterable<Vertex> resultIterator = db.getVertices("Myclass", new String[] {"key1","key2"} , new String[]{"value1","value2"});

and (key1+key2) is my composite key (non-unique)

and if I query the same from studio I am getting results; example :

select from Myclass where key1='value1' and key2="value2"

am I doing something wrong ?

Upvotes: 1

Views: 61

Answers (1)

Michela Bonizzi
Michela Bonizzi

Reputation: 2632

Try this:

Iterable resultIterator=g.getVertices("MyClass",new String[] {"key1","key2"}, new Object[] {"value1",value2});

P.S. value2 must be an Integer

Regards

Upvotes: 1

Related Questions