Query with named parameters don't work on version 3.1.9

Open
#9,558 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, javascript
Domain
databases

Research direction

Start by reproducing the named-parameter query from the issue against OrientDB 3.1.9 using the linked Dockerfile and compare it with the working positional-parameter query. Trace the database query entry point used by orient.getDatabase().query; done means named parameters return the same three records as the positional form.

Written by the indexing model from the issue text.

Description

OrientDB Version: 3.1.9
Java Version:
OS: docker official image from dockerhub: https://github.com/orientechnologies/orientdb-docker/blob/ab031010726608c83a20763119b32c96233daa15/release/3.1.x/3.1.9/Dockerfile

Expected behavior

var plemma='corsa';

//var pass = orient.getDatabase().query("select from morph where lemma = ?",plemma); // this works (it returns 3 records)

// The following don't work (empty list)
//var pass = orient.getDatabase().query("select from morph where lemma = :plemma",{params: {plemma: plemma}});
//var pass = orient.getDatabase().query("select from morph where lemma = :testLemma",{params:{testLemma: plemma}});
// var pass = orient.getDatabase().query('select from morph where lemma = :testLemma',{testLemma: plemma});
var pass = orient.getDatabase().query("select from morph where lemma = :testLemma",{testLemma: plemma});

// uncommented version worked on version 2.2.37
return pass;

Actual behavior

see above: every tested version with named parameters returns an empty list, instead of 3 records

Steps to reproduce

see above

Dominant language
Java
Stars
5k
Forks
868
Avg merge
15h 6m
Merged PRs (30d)
18

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from orientechnologies/orientdb

All issues in orientechnologies/orientdb

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.