Skip to content
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

Error accessing property of embeddedmap #5391

Closed
alpeshgaglani opened this issue Nov 28, 2015 · 2 comments
Closed

Error accessing property of embeddedmap #5391

alpeshgaglani opened this issue Nov 28, 2015 · 2 comments
Assignees
Labels

Comments

@alpeshgaglani
Copy link

Hi,
I'm using 2.1.6. I have an issue that occurs on our production ubuntu boxes. On those, accessing a property of an embeddedmap causes the following error:

Error: com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command at position #0: Error parsing query:
select states.1-15-0 from #23:4923
Encountered " <FLOATING_POINT_LITERAL> ".1 "" at line 1, column 20.
Was expecting one of:
    <EOF>
    <TIMEOUT> ...
    <AS> ...
    <FETCHPLAN> ...
    <LOCK> ...
    <LET> ...
    <NOCACHE> ...
    <PARALLEL> ...
    <UNWIND> ...
    ";" ...
    "," ...
    <AS> ...
    "," ...

The sql command: select states.1-15-0 from #23:4923. If I just run select states from #23:4923, it works fine and I get:

----+------+--------------------
#   |@CLASS|states
----+------+--------------------
0   |null  |{1-15-0={test=test}}
----+------+--------------------

This is the Java version on the servers.
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

Strangely, the same (select states.1-15-0 from #23:1) works just fine on my Windows development server.

Any clues what might be going on?

Thanks!

@luigidellaquila
Copy link
Member

Hi @alpeshgaglani

``1-15-0 is not a valid identifier (property name) per se, if you want to use it in a query projection you have to quote it with back ticks:

select states.`1-15-0` from #23:1

It is strange that it is working on Windows, are you using the same OrientDB version?

Thanks

Luigi

@alpeshgaglani
Copy link
Author

Thanks for the quick response! The backtick quotes works great.
Inteterstingly, without the quotes, it has always worked on my windows server, and used to work since 2.1.0 even on our linux servers. My windows OrientDB version is 2.1.6 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants