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

hasId step fails #150

Open
To-om opened this issue Jul 19, 2018 · 5 comments
Open

hasId step fails #150

To-om opened this issue Jul 19, 2018 · 5 comments
Assignees
Labels

Comments

@To-om
Copy link

To-om commented Jul 19, 2018

The gremlin step hasId fails with the error:

com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error parsing query:
SELECT FROM `V`  WHERE   `~id` = :~id

I've done the PR #149 to add unit tests.

wolf4ood added a commit that referenced this issue Jul 19, 2018
wolf4ood added a commit that referenced this issue Jul 19, 2018
@wolf4ood
Copy link
Member

Hi @To-om

Thanks for the test cases. I've reproduces it and fixed
I've integrated your tests in our test suite here

82dd280#diff-1494a2e455881effe25f767e3c12679bR160

The fix will be available in the next release 3.0.5 or in the next snapshot

@wolf4ood wolf4ood self-assigned this Jul 19, 2018
@wolf4ood wolf4ood added the bug label Jul 19, 2018
@To-om
Copy link
Author

To-om commented Jul 19, 2018

Thank you for your quick fix. I confirm that it solve the parsing error. Unfortunately, I still have issue in my project.
In the same transaction I do create a vertex using defined class (I used strict schema) then

Vertex v = graph.traversal().V(createdVertex.id()).next();
graph.traversal().V().hasId(createdVertex.id()).next(); // fails

I have not yet succeeded in reproducing the problem in an unit test.

@wolf4ood
Copy link
Member

Hi @To-om

which error do you get on the second issue?

@To-om
Copy link
Author

To-om commented Jul 26, 2018

The vertex is not found

@To-om
Copy link
Author

To-om commented Jul 26, 2018

I've just reproduced the error in an unit test. The test hasIdWithString is not correctly named as ID is not a string but an object. If you stringify it, the test fails.
Assert.assertEquals(1, graph.traversal().V().hasId(v1.id()).toList().size()); : PASS
Assert.assertEquals(1, graph.traversal().V().hasId(v1.id().toString()).toList().size()); : FAIL

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

No branches or pull requests

2 participants