Hibernate version: 3.2
Hi All,
Im using dynamic-insert and it works fine on all objects but for those objects in which we have a
Component or
user defined field is available then we have problems as it generate code for all the fields even though the values are null for the field(with dynamic-insert set to true .
Is there any way I can deal with this issue.(Any alternative or is it possible to set the Dynamic-insert on Component Mappings also ?
Thanks,
Vinodh
Mapping Sample
Code:
<hibernate-mapping>
<class name="com.bbc..Entity" table="BBCENT" lazy="false" dynamic-insert="true" dynamic-update="true">
<comment></comment>
<composite-id name="entityId" class="com.bbc..id.BbcentId">
<key-property name="applId" type="int">
<column name="APPL_ID" />
</key-property>
<key-property name="entyId" type="int">
<column name="ENTY_ID" />
</key-property>
</composite-id>
<joined-subclass name="com.bbc..BusinessEntity" table="BBCBUS" lazy="false" dynamic-insert="true" dynamic-update="true">
<comment></comment>
<key>
<column name="APPL_ID" />
<column name="ENTY_ID" />
</key>
<component name="business" class="com.bbc..Business" lazy="false" >
<property name="taxIdNo" type="string">
<column name="TAX_ID_NO" length="9" not-null="false">
<comment></comment>
</column>
</property>
<property name="sicCode" type="string">
<column name="SIC_C" length="8" not-null="false">
<comment></comment>
</column>
</property>
<property name="naicsCode" type="string">
<column name="NAICS_C" length="8" not-null="false">
<comment></comment>
</column>
</property>
</component>
</joined-subclass>
<many-to-one name="loanApplication" class="com.bbc..LoanApplication" update="false" insert="false" fetch="select">
<column name="APPL_ID" not-null="false">
<comment></comment>
</column>
</many-to-one>
</class>
</hibernate-mapping>