【问题标题】:Hibernate: Load entities with Formula休眠:使用公式加载实体
【发布时间】:2011-08-17 20:03:02
【问题描述】:

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

例如:

@formula("(select * from myEntity ent where ent.isLatest = TRUE )")
publicmyEntity getmyEntity()
{
    return this.associatedPatientJournalEntries;
}

如果是这样,映射的外观如何。

此外,使用公式加载某些实体的替代方法是什么?

【问题讨论】:

    标签: hibernate orm formula


    【解决方案1】:

    你可以,但公式看起来:

    select ent from myEntity ent where ent.isLatest
    

    另一种选择是,

    mounting the entity in your method.
    
    post loading method
    

    【讨论】:

      猜你喜欢
      • 2013-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-11
      • 1970-01-01
      • 2019-06-22
      相关资源
      最近更新 更多