我正在制作一个OGM在我们的项目中使用。它工作得很好,但我在类创建过程和类名中的UTF8字符方面有问题。我们说西班牙语,所以有些班级的名字使用重音符号。OGM尝试使用它的类名创建类。下面是store方法的一部分:
public <T> String store(T o) throws IncorrectRIDField, NoOpenTx {
String rid = null;
try {
// si no hay una tx abierta, disparar una excepción
if (this.graphdb == null) {
throw new NoOpenTx();
}
String classname = o.getClass().getSimpleName();
...
...
...
// verificar que la clase existe
if (this.getDBClass(o.getClass())==null){
graphdb.createVertexType(classname);
}
OrientVertex v = graphdb.addVertex("class:" + classname, omap);嗯,类工作得很好,但是类(“createVertexType:”...创建另一个名称错误的类。下面是输出:
CLASSES
----------------------------------------------+------------------------------------+------------+----------------+
NAME | SUPERCLASS | CLUSTERS | RECORDS |
----------------------------------------------+------------------------------------+------------+----------------+
_studio | | 11 | 23 |
E | | 10 | 0 |
OFunction | | 6 | 0 |
OIdentity | | - | 0 |
ORestricted | | - | 0 |
ORIDs | | 8 | 0 |
ORole | [OIdentity] | 4 | 3 |
OSchedule | | 7 | 0 |
OTriggered | | - | 0 |
OUser | [OIdentity] | 5 | 3 |
Pa%C3%ADs | [V] | 13 | 1 |
Pa%C3%ADs_provincias | [E] | 16 | 0 |
País | [V] | 12 | 0 |
Provincia | [V] | 14 | 1 |
Provincia_pa%C3%ADs | [E] | 15 | 1 |
V | | 9 | 0 |
----------------------------------------------+------------------------------------+------------+----------------+
TOTAL = 16 32 |
----------------------------------------------+------------------------------------+------------+----------------+如何解决这个问题?默认情况下,边是使用类名+ "_“+ fieldname创建的,并且具有相同的问题。
有什么想法吗?谢谢!!
发布于 2016-04-08 23:42:05
你能在github上打开一个问题吗?
https://stackoverflow.com/questions/36503501
复制相似问题