Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/108.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hibernate:使用公式加载实体_Hibernate_Orm_Formula - Fatal编程技术网

Hibernate:使用公式加载实体

Hibernate:使用公式加载实体,hibernate,orm,formula,Hibernate,Orm,Formula,是否可以使用公式加载实体 例如: @formula("(select * from myEntity ent where ent.isLatest = TRUE )") publicmyEntity getmyEntity() { return this.associatedPatientJournalEntries; } 如果是这样,映射必须是什么样子的 另外,除了使用公式加载某些实体,还有什么替代方法?您可以,但公式看起来: select ent from myEntity ent

是否可以使用公式加载实体

例如:

@formula("(select * from myEntity ent where ent.isLatest = TRUE )")
publicmyEntity getmyEntity()
{
    return this.associatedPatientJournalEntries;
}
如果是这样,映射必须是什么样子的


另外,除了使用公式加载某些实体,还有什么替代方法?

您可以,但公式看起来:

select ent from myEntity ent where ent.isLatest
另一种选择是

mounting the entity in your method.

post loading method