Orientdb Tinkerpop框架:如何创建新顶点

Orientdb Tinkerpop框架:如何创建新顶点,orientdb,tinkerpop,tinkerpop-blueprint,tinkerpop-frames,Orientdb,Tinkerpop,Tinkerpop Blueprint,Tinkerpop Frames,我不能用Tinkerpop框架和蓝图(2.6版)来保存新顶点。 我做错了什么?这是我的密码。。从无用的零件上稍微清洁一下。 我使用OrientDb作为不可靠的图形数据库引擎 我没有收到任何异常,但当我查看数据库时,它是空的。 你能注意到为什么吗? 谢谢大家! 框架实体: public interface User extends VertexFrame{ @Property("id") public String getId(); @Property("id") public void get

我不能用Tinkerpop框架和蓝图(2.6版)来保存新顶点。 我做错了什么?这是我的密码。。从无用的零件上稍微清洁一下。 我使用OrientDb作为不可靠的图形数据库引擎

我没有收到任何异常,但当我查看数据库时,它是空的。 你能注意到为什么吗? 谢谢大家!

框架实体:

public interface User extends VertexFrame{

@Property("id")
public String getId();
@Property("id")
public void getId(String Id);

@Property("email")
public String getEmail();
@Property("email")
public void setEmail(String email);

@Property("password")
public String getPassword();
@Property("password")
public void getPassword(String providerId);

@Property("firstName")
public String getFirstName();
@Property("firstName")
public void setFirstName(String firstName);
}
用户管理器类:

public class UserManager implements Serializable {
    FramedGraphFactory framedFactory = new FramedGraphFactory();
    OrientGraphFactory graphFactory = new OrientGraphFactory("remote:192.168.50.10:2424/database", "user", "pass");
    OrientGraph instance = graphFactory.getTx();
    FramedGraph<OrientGraph> framedGraph = framedFactory.create(instance);


    User user = framedGraph.addVertex(UUID.randomUUID(), User.class);
    user.setFirstName(profile.getFirstName());
    user.setLastName(profile.getLastName());


    OrientVertex u = (OrientVertex) user.asVertex();
    u.save();
}
公共类UserManager实现可序列化{
FramedGraphFactory framedFactory=新FramedGraphFactory();
OrientGraphFactory graphFactory=新的OrientGraphFactory(“远程:192.168.50.10:2424/数据库”,“用户”,“通过”);
OrientGraph实例=graphFactory.getTx();
FramedGraph FramedGraph=framedFactory.create(实例);
User User=framedGraph.addVertex(UUID.randomUUID(),User.class);
user.setFirstName(profile.getFirstName());
user.setLastName(profile.getLastName());
OrientVertex u=(OrientVertex)user.asVertex();
u、 save();
}

我非常确定您需要提交事务

你能试着用FramedTransactionalGraph吗

FramedTransactionalGraph<OrientGraph> framedGraph = framedFactory.create(instance);

....Code....

framedGraph.commit();
FramedTransactionalGraph framedGraph=framedFactory.create(实例);
……代码。。。。
framedGraph.commit();

另外,如果这是一个绿地项目,请查看。它是框架的精神继承者。(免责声明我是Totorom的开发者)正确。谢谢!:)现在的问题是更新转换为具有帧但与db分离的实体的顶点。。你对最佳实践有什么建议吗?