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: Operator = not compatbile urgently please
PostPosted: Thu Apr 28, 2005 3:34 am 
Regular
Regular

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

i don't understand because hibernate throws always "operator = not compatbile" with this query.
If i don't use " ay.sepdizioni.magcbt=?" the query work, i have checked
the type but it's a simple "String" magcbt.
Can you help i have made some mistake in mapping?
Devis

Code:
      Query sql = session.createQuery("from CScontrinoVO as ay where ay.pk.cbara=? and ay.pk.filia=? and ay.spedizioni.magcbt=?");

      sql.setString(0, "aa");
      sql.setString(1, "bb");
      sql.setString(2, "cc");




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


   <class name="vo.as400.CScontrinoVO" table="sdgtwb_dat.aynau00f" lazy="false" >

         <composite-id name="pk" class="vo.pk.CScontrinoPK">
              <key-property name="cbara" column="cbar$a" type="string"/>
              <key-property name="filia" column="fili$a" type="string"/>
        </composite-id>





        <property name="staga"  column="stag$a" type="dao.hibernate.TrimmedString"/>

        <property name="modea"  column="mode$a" type="dao.hibernate.TrimmedString"/>
        <property name="matea"  column="mate$a" type="dao.hibernate.TrimmedString"/>
        <property name="coloa"  column="colo$a" type="dao.hibernate.TrimmedString"/>
        <property name="varia"  column="vari$a" type="dao.hibernate.TrimmedString"/>
        <property name="cdtga"  column="cdtg$a" type="dao.hibernate.TrimmedString"/>
        <property name="tgsia"  column="tgsi$a" type="dao.hibernate.TrimmedString"/>
        <property name="pvena"  column="pven$a" />
        <property name="pacqa"  column="pacq$a" />
        <property name="de20a"  column="de20$a" type="dao.hibernate.TrimmedString"/>
        <property name="dcola"  column="dcol$a" type="dao.hibernate.TrimmedString"/>
        <property name="dcmpa"  column="dcmp$a" type="dao.hibernate.TrimmedString"/>
        <property name="ggspa"  column="ggsp$a" />
        <property name="mmspa"  column="mmsp$a" />
        <property name="aaspa"  column="aasp$a" />

        <many-to-one name="spedizioni" class="vo.as400.CSpedizioniVO" lazy="false" update="false" insert="false"   not-null="true">
      <column name="GGSP$A"/>
      <column name="MMSP$A"/>
      <column name="AASP$A"/>
      <formula>20</formula>
      <formula>'V'</formula>
      <formula>(TRIM(SUBSTR(NDOC$A,1,8)))</formula>
      
      
   </many-to-one>

        </class>


</hibernate-mapping>

Spedizioni.hbm

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


   <class name="vo.as400.CSpedizioniVO" table="sdgtwb_dat.bspte00f" lazy="false" >

         <composite-id name="pk" class="vo.pk.CSpedizioniPK">
              <key-property name="ggosbt" column="ggosbt" />
                        <key-property name="mmosbt" column="mmosbt" />
              <key-property name="aaosbt" column="aaosbt" />
              <key-property name="soosbt" column="soosbt" />
              <key-property name="sbspbt" column="sbspbt" />
                   <key-property name="nbspbt" column="nbspbt" />
       
        </composite-id>





        <property name="magpbt"  column="magpbt" />
        <property name="magcbt"  column="magcbt" />
       
   

        </class>


</hibernate-mapping>


[/code]


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.