当我尝试创建一个类时,它的名称包含一个数字(例如 3D 打印机),OrientDB 拒绝并回答(在 Studio 中):
Error parsing query: CREATE CLASS 3D-Printers ^ Encountered "
FLOATING_POINT_LITERAL "3D "" at line 1, column 14. Was expecting one of: TO ... VALUE ...
..等等
当尝试使用 createVertexType 从 Java 应用程序执行相同操作时,出现此异常:
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)
只是想知道 - 是否可以以某种方式在类名称中使用数字?如果不是 - OrientDB 中的类命名约定是什么?据我所知,符号。 ,/' 受到限制;但数字?
使用社区版2.2.4
最佳答案
OrientDB 使用 Java 类名约定,因此您可以使用数字,但不能作为第一个字符。
关于naming-conventions - OrientDB - 类名中的数字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38285143/