-->
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: Class with where clause
PostPosted: Thu Mar 10, 2005 1:52 pm 
Regular
Regular

Joined: Thu Feb 24, 2005 2:34 pm
Posts: 80
Hibernate version:3 rc1


Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>


   <class name="vo.as400.CCmpf" table="sdgtwb_dat.arctb00f" lazy="false" where ="cdtbtb in ('CMP')">


     <composite-id>
      <key-property name="cdc_cmpf"    column="cdeltb"/>
         </composite-id>
     
     

        <property name="tpo_tbl"  column="CDTBTB" type="string" />
        <property name="dsc_cmpf"  column="DATITB" type="string" />

               

        </class>
</filter-def>
</hibernate-mapping>



<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>

   <class name="vo.as400.ModeVO" table="sdgtwb_dat.arcmo00f" lazy="false">


     <composite-id name="modevopk" class="vo.pk.ModeVOPK" >
              <key-property name="stagmo" column="stagmo" type="string"/>
              <key-property name="modemo" column="modemo" type="string"/>
        </composite-id>

       

         <property name="de20mo"  column="de20mo" type="string" />
         <property name="da30mo" column="da30mo" type="string" />



   <many-to-one name="cmpfmo" class="vo.as400.CCmpf" lazy="false" update="false" insert="false">
        
      <column name="cmpfmo"/>
   
         
   </many-to-one>

















     </class>




</hibernate-mapping>








Why Hibernate when load association ignore the "where clause on the top of class " vo.as400.CCmp? can you help me please!!!!
It's possible with association in alternative in an association it is possible to pass a value to fixed where?
for example

<many-to-one name="cmpfmo" class="vo.as400.CCmpf" lazy="false" update="false" insert="false">

<column name="cmpfmo"/>
<???>'CMP'<???>


</many-to-one>

Thank's in advance
Devis


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.