orientdborientdb-2.1orientdb2.2

alternative of Orientdb getVertexByKey() deprecated method in 2.2.10?


I am using Orientdb 2.2.10

What I want?

I want to get a vertex having uId = 'ram' of classtype = "Person" from my Graphdb.

My graphdb is indexed with unique key 'uid'.

How I am solving it?

Is there any alternative of this in 2.2.10?

If not, is it safe to use it?

Thanks


Solution

  • You can use:

    Iterable<Vertex> it=g.getVertices("uid", "ram");
    

    Hope it helps.

    Regards.