OrientDB:将元数据添加到 class

OrientDB: add metadata to a class

我需要将元数据添加到顶点 class。 我想将 java class 的规范名称存储在 Vertex class 定义中作为元数据,以便稍后我可以要求它实例化和混合对象。 有什么办法吗?

您可以使用 ALTER CLASS command 定义自定义元数据。例子.

ALTER CLASS Post CUSTOM javaClass="com.my.Post"

因此您可以通过 API 或 SQL 检索自定义 属性。

更多信息请查看官方文档:http://orientdb.com/docs/last/SQL-Alter-Class.html