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

RID as paramer is not recognized in TRAVERSE query for vertex as well as edge #1445

Closed
ironluca opened this issue Jan 24, 2024 · 3 comments
Closed
Assignees
Labels
bug Something isn't working fixed
Milestone

Comments

@ironluca
Copy link

Similar/related to issue 1430

For traversal queries, for vertex or edge; if RID is provided as a parameter, it is not recognized and exception is generated

try{

        db.command("sql", "CREATE VERTEX TYPE TVtx IF NOT EXISTS");
        db.command("sql", "CREATE EDGE TYPE TEdg IF NOT EXISTS");
        RID newVtx0Id=db.command("sql", "CREATE VERTEX TVtx").next().getIdentity().get();
        RID newVtx1Id=db.command("sql", "CREATE VERTEX TVtx").next().getIdentity().get();

        Map<String, Object> params=new HashMap<>();
        params.put("fromRid", newVtx0Id);
        params.put("toRid", newVtx1Id);
        RID newEdgRid=db.command("sql", "CREATE EDGE TEdg FROM :fromRid TO :toRid", params).next().getIdentity().get();

        params.clear();
        params.put("rid", newVtx0Id);
        String traverseQuery="SELECT FROM (TRAVERSE out('TEdg') FROM :rid MAXDEPTH 1)";
        //This also does not recognize RID parameter
        //String traverseQuery="SELECT FROM (TRAVERSE inV() FROM :rid MAXDEPTH 1)";
        db.command("sql", traverseQuery, params);

    }catch(Exception e){e.printStackTrace();}

Exception

com.arcadedb.exception.SchemaException: Type with name '#77:0' was not found
        at com.arcadedb.remote.RemoteHttpComponent.manageException(RemoteHttpComponent.java:433)
        at com.arcadedb.remote.RemoteHttpComponent.httpCommand(RemoteHttpComponent.java:170)
        at com.arcadedb.remote.RemoteDatabase.databaseCommand(RemoteDatabase.java:461)
        at com.arcadedb.remote.RemoteDatabase.command(RemoteDatabase.java:398)
        at com.arcadedb.remote.RemoteDatabase.command(RemoteDatabase.java:383)

Server Trace
image

lvca added a commit that referenced this issue Jan 25, 2024
@lvca lvca self-assigned this Jan 25, 2024
@lvca lvca added the bug Something isn't working label Jan 25, 2024
@lvca lvca added this to the 24.1.1 milestone Jan 25, 2024
@lvca
Copy link
Contributor

lvca commented Jan 25, 2024

Fixed

@lvca lvca closed this as completed Jan 25, 2024
@lvca lvca added the fixed label Jan 25, 2024
@ironluca
Copy link
Author

@lvca Tested, working perfectly, thanks for the fix

@lvca
Copy link
Contributor

lvca commented Jan 25, 2024

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants