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