因此,我找到了解决此特定问题的方法。该
latestResult属性的注释如下:
@ManyToOne@JoinColumnsOrFormulas({ @JoinColumnOrFormula(formula=@JoinFormula(value="(SELECt r.id FROM Result r WHERe resultDate = (SELECt MAX(sqr.resultDate) FROM Result sqr WHERe sqr.test_id = id))", referencedColumnName="id")),})private Result latestResult;
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)