Hibernate让Model支持关联扩展属性


Hibernate让Model支持关联扩展属性:

select new Jxc(a,b.mc) from Jxc as a,btb as b

在Model中创建构造方法:

Jxc(Jxc jxc ,String mc){
BeanUtilsBean.getInstance().copyProperties(this, jxc);
this.setMc(mc);
}

给Model设备transient属性:
@Transient
public String getMc() {
return mc;
}
public void setMc(String value) {
this.mc = value;
}

原文地址:https://www.cnblogs.com/meetrice/p/2423367.html