Skip to content

Chaining ORDER and WITH clauses on previously applied WITH #1731

Description

@lkalwa

Given there is a User model with name attribute.

Using:
User.as(:u).query.with(:u).order("u.name ASC").with(:u)

Is generating incorrect cypher:
"MATCH (u:User) WITH u, u ORDER BY u.name ASC" which duplicates aliases used withWITH

Causing:
Neo4j::Driver::Exceptions::ClientException: Multiple result columns with the same name are not supported (line 1, column 23 (offset: 22)) (Neo4j::Driver::Exceptions::ClientException) "MATCH (u:User) WITH u, u ORDER BY u.name ASC"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions