1
我有一个这样的实体:如何在HQL使用派生的财产where子句
public class Account{
private String code;
@ManyToOne
private Account ledgerAccount;
public String getCode(){
return code;
}
public String getFullCode(){
return ledgerAccount.getCode()+code;
}
}
所以,fullCode
是派生的财产,我想在我的HQL查询使用它,我怎样才能实现这一目标?
谢谢你的提示,使用这个公式它的工作:@Formula(“(从帐户a中选择a.code‖代码,其中a.id = ledgeraccount_id)”) – blow