在后台HeartingStation与HeartingSource是多对一的关系
HeartingStation 类中的配置
@Column(name = "hsId")
private Integer hsId;
@ManyToOne
@JoinColumn(name = "hsId",insertable = false, updatable = false)
private HeatingSourceBean heatingSourceBean;
在查询HeatingStation 的时候 已经将 HeatingSource 查出来了数据结构是这样的
[
{
"id": 1,
"name": "なになになに",
"hsId": 1,
"comment": "なになに",
"heatingSourceBean": {
"id": 1,
"name": "なになになに",
"comment": "なになに"
}
}
]
ExtJs 中的filed配置
{
fieldLabel : "所属热源",
store: heatingSourceStore,
id:'com',
xtype: 'combo',
displayField:'name',
valueField:'id',
name:'hsId',
editable : false,
allowBlank : false,
labelAlign : "right"
},