首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OrientDB: utf8类名问题

OrientDB: utf8类名问题
EN

Stack Overflow用户
提问于 2016-04-08 23:26:04
回答 1查看 75关注 0票数 0

我正在制作一个OGM在我们的项目中使用。它工作得很好,但我在类创建过程和类名中的UTF8字符方面有问题。我们说西班牙语,所以有些班级的名字使用重音符号。OGM尝试使用它的类名创建类。下面是store方法的一部分:

代码语言:javascript
复制
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:”...创建另一个名称错误的类。下面是输出:

代码语言:javascript
复制
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创建的,并且具有相同的问题。

有什么想法吗?谢谢!!

EN

回答 1

Stack Overflow用户

发布于 2016-04-08 23:42:05

你能在github上打开一个问题吗?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36503501

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档