-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Dynamic Insert/update not working for Component Mappings
PostPosted: Mon Oct 23, 2006 4:17 pm 
Beginner
Beginner

Joined: Thu Aug 31, 2006 2:31 pm
Posts: 25
Location: USA
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>

_________________
I am using a shitty e-mail filtering system that caused a lot of bounces for the admin of this forum. I need to turn on my brain next time and update my e-mail address.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.