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

Not able to create property with name which only includes numbers (e.g. '1234') #448

Open
aryanPatilhm2 opened this issue Sep 2, 2021 · 0 comments

Comments

@aryanPatilhm2
Copy link

Hi, I am trying to add one property under my class which includes only numbers e.g. '1234'. Whenever I fire request, it throws below error,

:"Error parsing query:\nCREATE PROPERTY myclass.1234 Linkset\n ^\nEncountered \" <FLOATING_POINT_LITERAL> \".1234 \"\" at line 1, column 23.\nWas expecting:\n \".\" ...\n \r\n\tDB name=\"MYDB\"\r\n\tError Code=\"1\"","errorStack":"OrientDB.RequestError: Error parsing query:\nCREATE PROPERTY myclass.1234 Linkset\n ^\nEncountered \" <FLOATING_POINT_LITERAL> \".1234 \"\" at line 1, column 23.\nWas expecting:\n \".\" ...\n \r\n\tDB name=\"MYDB\"\r\n\tError Code=\"1\"\n at child.Operation.parseError (/usr/src/app/node_modules/orientjs/lib/client/network/protocol37/operation.js:1247:13)\n at child.Operation.consume (/usr/src/app/node_modules/orientjs/lib/client/network/protocol37/operation.js:571:35)\n at ONetworkConnection.Connection.process (/usr/src/app/node_modules/orientjs/lib/client/network/conn.js:462:17)\n at ONetworkConnection.Connection.handleSocketData (/usr/src/app/node_modules/orientjs/lib/client/network/conn.js:344:20)\n at Socket.emit (events.js:315:20)\n at addChunk (internal/streams/readable.js:309:12)\n at readableAddChunk (internal/streams/readable.js:284:9)\n at Socket.Readable.push (internal/streams/readable.js:223:10)\n at TCP.onStreamRead (internal/stream_base_commons.js:188:23)"

I tried to create same property with orientdb-studio and it worked. So I checked the query that fired from browser which is like below,

CREATE PROPERTY `myclass`.`1234` LINKSET
After that I checked in the orientjs modules code under path lib/client/database/class/property.js that on line 117, the logic is written such that it will generate the query like
CREATE PROPERTY myclass.1234 LINKSET
Can we have support for such property from module?

Thanks in advance ...

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

No branches or pull requests

1 participant