-
Notifications
You must be signed in to change notification settings - Fork 871
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
"select from ?" no longer works with OSQLAsynchQuery when upgrading to 2.2.12 #6896
Comments
hi @temilmg do you see some exception on OrientDB logs? |
No, all I get is the above stack-trace when running my code |
Upgrading from 2.1.17 to 2.2.13 is still giving me problems, its turning out to be not that straight forward. |
Hi @temilmg what are you passing to the query as a parameter? a RID, an OClass or a String? Thanks Luigi |
Hi, I am passing in a String |
Ok, this explains everything. A string is not a valid target, eg. if you do the following:
you will obtain the following
that is not a valid statement of course (or at least it's not what you need). I think the best thing to do here is support the following:
Please let me know your thoughts, it's not hard to implement Thanks Luigi |
No, maybe I didn't explain it correctly my parameter is a string e.g. "#14:0" As for my comment a day ago about "out('userrole').@Rid used to return an array of rids but now returns an array with null " should I create a separate issue? |
Ah, ok got it, you have to pass it as a RID, eg.
It worked in previous versions, but it's not a correct behavior, because a string is not a RID... Thanks Luigi |
Ok, fair enough! |
Closing then ;-) Thanks! Luigi |
OrientDB Version, operating system, or hardware.
Operating System
Expected behavior and actual behavior
After upgrading to 2.2.12 from 2.1.17 Async query with positional parameter using java api does not work with a query like:
String query = "select @Rid,* from ?";
Steps to reproduce the problem
String query = "select @Rid,* from ?";
graph.command(new OSQLAsynchQuery(query,
new OCommandResultListener() {
@OverRide
public boolean result(Object iRecord) {
}
The new method Object getResult() in the interface OCommandResultListener breaks the existing code. I am not sure what it should be used for?
After fixing the interface most of my queries work but "select from ?" doesn't work. Is it no longer allowed to do this kind of query or is it a regression bug?
here is the stack trace:
com.orientechnologies.orient.core.exception.OStorageException: Error on executing command: sql.select @Rid,* from ?
DB name="mxi2"
at com.orientechnologies.orient.client.remote.OStorageRemote.baseNetworkOperation(OStorageRemote.java:271)
at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperationRetry(OStorageRemote.java:193)
at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperation(OStorageRemote.java:204)
at com.orientechnologies.orient.client.remote.OStorageRemote.command(OStorageRemote.java:1136)
at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:78)
at com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery.run(OSQLAsynchQuery.java:74)
at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33)
at com.tinkerpop.blueprints.impls.orient.OrientGraphCommand.execute(OrientGraphCommand.java:49)
The text was updated successfully, but these errors were encountered: