//库房 Storeroom
@OneToMany(cascade=ALL, mappedBy="storeroom")
public Set<Storage> getStorages() { return storages; }//入库 Storage
@ManyToOne
@JoinColumn(name="STOREROOM_ID", nullable=false)
public Storeroom getStoreroom() { return storeroom; }但是,如果有库存调拨表,表中有“出库房”与“入库房”两列,那么应该怎么在Storeroom中定义这种OneToMany的关系呢,mappedBy应该怎么写呢?//库存调拨 StorageSwitch
@ManyToOne
@JoinColumn(name="IN_STOREROOM_ID", nullable=false)
public Storeroom getInStoreroom() { return inStoreroom; }@ManyToOne
@JoinColumn(name="OUT_STOREROOM_ID", nullable=false)
public Storeroom getOutStoreroom() { return outStoreroom; }