使用方法
private int replyCount;
@Formula("(select COUNT(*) from joytravmember.Tour_COMPANION_REPLY t where t.COMPANION_ID = id)")
public int getReplyCount() {
return replyCount;
}
public void setReplyCount(int replyCount) {
this.replyCount = replyCount;
}
只要在前台调用属性即可。