MATCH (author:`Author`), (author)-[rel_approved_approvedArticles:APPROVED]->
(approvedArticles:`Article`) WHERE id(author) = {authorid} RETURN approvedArticles,
rel_approved_approvedArticles ORDER BY approvedarticles.updated_at ASC SKIP 0 LIMIT 10
Resulting in this exception : Neoxygen\NeoClient\Exception\Neo4jException: Neo4j Exception with code "Neo.ClientError.Statement.InvalidSyntax" and message "approvedarticles not defined
The problem here is that the orderBy receives the node identifier in lower case approvedarticles.updated_at.
I believe these are the places where to start looking for the issue Vinelab\NeoEloquent\Query\Builder::matchRelation() , Vinelab/NeoEloquent/Query/Grammars/CypherGrammar::CompileComponent()
I tried to set the the parent['node'] and related['node'] to lower case
As result the query is transformed to something like this:
MATCH (author:`Author`), (author)-[rel_approved_approvedarticles:APPROVED]->
(approvedarticles:`Article`) WHERE id(author) = {authorid} RETURN approvedArticles,
rel_approved_approvedarticles ORDER BY approvedarticles.updated_at ASC SKIP 0 LIMIT 10
Where the RETURN statement still uses the old presentation, i.e. approvedArticles.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Using dynamic properties in builder causes methods like orderBy to fail.
something like:
will result in this query:
Resulting in this exception :
Neoxygen\NeoClient\Exception\Neo4jException: Neo4j Exception with code "Neo.ClientError.Statement.InvalidSyntax" and message "approvedarticles not defined
The problem here is that the
orderBy
receives the node identifier in lower caseapprovedarticles.updated_at
.I believe these are the places where to start looking for the issue
Vinelab\NeoEloquent\Query\Builder::matchRelation()
,Vinelab/NeoEloquent/Query/Grammars/CypherGrammar::CompileComponent()
I tried to set the the parent['node'] and related['node'] to lower case
As result the query is transformed to something like this:
Where the
RETURN
statement still uses the old presentation, i.e. approvedArticles.