hibernate many-to-one

hibernate many-to-one


[1]
 <id name="poiId" type="java.lang.Long">
            <column name="POI_ID" precision="22" scale="0" />
            <generator class="assigned" />
        </id>
       
    
        <many-to-one name="districtId" class="com.csc.poimanager.dao.TcDistrict"  update="true">
            <column name="DISTRICT_ID" length="6"></column>
        </many-to-one>

       
[2]
   
private TcDistrict districtId;

    public TcDistrict getDistrictId() {
        return this.districtId;
    }

    public void setDistrictId(TcDistrict districtId) {
        this.districtId = districtId;
    }

[3]




|----------------------------------------------------------------------------------------|
                           版权声明  版权所有 @zhyiwww
            引用请注明来源 http://www.blogjava.net/zhyiwww   
|----------------------------------------------------------------------------------------|

你可能感兴趣的:(hibernate many-to-one)