在manay-to-one
中设置laszy=“false”
<many-to-one class="com.yjpt.bean.BuildInformation" fetch="select" name="buildInformation" lazy="false">
<column name="BuildInformationNUM"/>
</many-to-one>
<property generated="never" lazy="false" name="buildPicture" type="java.lang.String">
<column name="BuildPicture"/>
</property>
</class>