Orientdb: Ignored named parameters for some queries

Created on 15 Mar 2017  路  6Comments  路  Source: orientechnologies/orientdb

OrientDB Version: 2.1.17

Java Version: openjdk version "1.8.0_121"

OS: linux

I've prepared a query:

SELECT *, out('hasPermission').type as permissions FROM User WHERE login >= :key AND out('hasPermission').type IN :permissions ORDER BY login ASC LIMIT :limit"

I provide following params:

key: ""; limit: 3; permissions: ["USER"]; //array of strings

Actual behavior

I receive no results from my database.

Expected behavior

I receive at least one result from my database.
If I change the query to :

SELECT *, out('hasPermission').type as permissions FROM User WHERE login >= :key AND out('hasPermission').type IN ["USER"] ORDER BY login ASC LIMIT :limit"

I get the expected results.

I've tried passing an array (It works in another simpler query), list and joined string as a parameter. I've changed the name of not responding parameter. Nothing seems to work.

Steps to reproduce

clone https://bitbucket.org/kmierzej/fragaria-server/branch/orientdb-ignored-params
./gradlew run

Examine the output of those commands:

>  wget -qO-  http://localhost:8080/api/admin/user?permission=USER&limit=3
  {"users": []}
>  wget -qO- http://localhost:8080/api/admin/user?limit=3
  {"users": [{"login":"admin","email":"[email protected]","permissions":["ADMIN","USER"],"fullname":"Admin - konto funkcyjne"},
  {"login":"duke","email":"[email protected]","permissions":["USER"],"fullname":"Duke Hufflepuff"}, 
  {"login":"john","email":"[email protected]","permissions":["USER"],"fullname":"John Shephard"}]}
bug

Most helpful comment

Hi @karolmie1

The release n 2.2.18 is scheduled for next Wednesday, 5th April

Thanks

Luigi

All 6 comments

Hi @karolmie1

I managed to reproduce the problem, I'm working to a fix now

Thanks

Luigi

Hi @karolmie1

I just pushed a fix on 2.2.x branch, the fix will be released with 2.2.18

Thanks

Luigi

鉂わ笍 鉂わ笍 鉂わ笍

Do you know when 2.2.18 will be available?

Hi @karolmie1

We are scheduling it, I'll let you know asap

Thanks

Luigi

Hi @karolmie1

The release n 2.2.18 is scheduled for next Wednesday, 5th April

Thanks

Luigi

Was this page helpful?
0 / 5 - 0 ratings