铸造特定类HQL
问题描述:
我的情况是这样的。(注:对于那些谁和jBPM可能已经熟悉了以下数据结构和HB测绘工作)铸造特定类HQL
类LongInstance从VariableInstance延伸,与映射字段“值”在LongInstance中重写。 VariableInstance的映射是here和LongInstance here。
VariableInstance被多态映射到TokenVariableMap中的集合,映射为here。
问题:如何使用成员类的特定/重写属性来查询多态集合?
我正在寻找这样的事情 “......从TokenVariableMaps TVM 左加入取tvm.variableInstances TVI 哪里投(TVI为LongInstance)在.value的(:瓦尔)”
答
为什么不:
.. from TokenVariableMaps tvm, LongInstance li
where tvm.variableInstances = li
and ...
答
HQL支持运行时鉴别:
select c from AnyClass where c.class = com.pack.SubClass
这真的作品。 – 2017-02-25 11:05:50