Search code examples
naming-conventionsorientdbclassname

OrientDB - numbers in the class names


When I'm trying to create a class, that it's name contains a number (ex., 3D-Printers), OrientDB refuses and answers (in Studio):

Error parsing query: CREATE CLASS 3D-Printers ^ Encountered "
FLOATING_POINT_LITERAL "3D "" at line 1, column 14. Was expecting one of: TO ... VALUE ...

..etcetc

When trying to do the same from Java app with createVertexType, getting this exception:

com.orientechnologies.orient.enterprise.channel.binary.OResponseProcessingException: Exception during response processing ......

Caused by: java.lang.NumberFormatException: For input string: "3D-Printers"

at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source)

Just wondering - is it possible to use numbers in classes names somehow? And if not - what is the class naming convention in OrientDB? As I know, symbols . , / ' are restricted; but numbers?

using community edition 2.2.4


Solution

  • OrientDB uses the Java convention for class names, so you can use numbers, but not as first character.