Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getVertices(String,String[],Object[]) returns results from other classes #3889

Closed
Desidero opened this issue Apr 7, 2015 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@Desidero
Copy link

Desidero commented Apr 7, 2015

This started as a question in stackoverflow, but it looks like there's a bug...

Basic issue:

  1. Create ClassA (extends V) -> Create properties String A, String B, String C -> Create unique composite index on (A,B,C)
  2. Create ClassB (extends V) -> Create property String J -> Create index on J (not sure if this property/index matters)
  3. Add a record to ClassA ("foo","bar","ed)
  4. orientGraph.getVertices("ClassB", new String[] {"A","B","C"}, new String[] {"foo","bar","ed"})

Expected result is no records returned since we did the search on ClassB. The actual outcome is that we retrieve the record created in step 3 which is from ClassA.

Please see this post (especially the comments) for more information: http://stackoverflow.com/questions/29474506/orientdb-getvertices-not-working-with-java-generated-class-index

@Desidero Desidero changed the title getVertices(String,String[],Object) returns results from other classes getVertices(String,String[],Object[]) returns results from other classes Apr 7, 2015
@vitorenesduarte
Copy link
Contributor

I believe this happens with getVertices(String label, String key, Object value) too.

@lvca lvca added this to the 2.0.9 milestone Apr 25, 2015
wolf4ood added a commit that referenced this issue Apr 27, 2015
@wolf4ood wolf4ood added the bug label Apr 27, 2015
wolf4ood added a commit that referenced this issue Apr 27, 2015
@Asimovtech
Copy link

I"m using OrientDB 2.1

I found the same error while trying to do

graph.getVertices("User.display_name", "test100")

to get only vertices of type User that have display_name property set to test100

I also have Registration objects that have property display_name set to test100

I got a vertex of type Registration, instead of User,

I have currently fixed this by using

graph.getVertices('User', new String[]{"display_name"}, new Object[]{"test100"})

Is there a bug or am I doing something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants