让我们有一个类X和Y,以及它们之间的关系。 从类映射器(class.iterate\u properties iterator)我们可以得到所有类的属性。 所以x2y和y2x是RelationshipProperty,我希望从关系的远程端得到一个类或一个对象的类名。在
我已经想办法解决了。
我找到了x2y.remote_side[0].table.name
,制作了一个表映射,它将一个表名映射到一个类上,并且它对于一对多和一对一都很好。如果我将它用于多对多,那么表名就是一个关联表。在
有什么关于我如何获得远程旁听课的提示吗?在
X.x2y。property.mapper.class\在
relationshipproperty最终将获得类级别的属性文档,就像mapper现在所做的那样。在
编辑。下面是一个测试,它演示了上面从“X”返回“Y”的过程,没有反射不会创建关系,因此应该没有任何效果:
我发现relationshipproperty上的方法参数()返回远程类。在
相关问题 更多 >
编程相关推荐