hibernate does not return the correct values -


my problem this, mapped project classes in xml , shape objects hibernate automatically method (). question return data other rows not match ask

this class mapping alimento

<?xml version="1.0"?> <!doctype hibernate-mapping public "-//hibernate/hibernate mapping dtd 3.0//en" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> <!-- generated 29-may-2014 11:22:30 hibernate tools 3.4.0.cr1 --> <hibernate-mapping>     <class name="innopckg.alimento" table="alimento">         <id name="id" type="int">             <column name="id_al" />             <generator class="identity" />         </id>         <property name="nombre" type="java.lang.string" >             <column name="nombre" unique="true"/>         </property>         <set name="compuestos" table="compuesto_alimento" lazy="true" inverse="true">             <key>                 <column name="id_alimento" />              </key>              <many-to-many column="id_compuesto" class="innopckg.compuesto" unique="true"/>         </set>          <join table="referencia_alimento" inverse="false" fetch="select" >             <key >                               <column name="id_alimento" />             </key>             <many-to-one name="ref" class="innopckg.referencia"                 column="id_referencia" />             <property name="cantidad" type="double" >                 <column name="cantidad" />             </property>          </join>     </class> </hibernate-mapping> 

and mapping class referencia

<?xml version="1.0"?> <!doctype hibernate-mapping public "-//hibernate/hibernate mapping dtd 3.0//en"                                    "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> <!-- generated 29-may-2014 11:22:30 hibernate tools 3.4.0.cr1 --> <hibernate-mapping>  <class name="innopckg.referencia" table="referencia">   <id name="id" type="int">    <column name="id_ref"/>    <generator class="identity"/>   </id>   <property generated="never" lazy="false" name="nombre" type="java.lang.string">    <column name="nombre" unique="true"/>   </property>   <property generated="never" lazy="false" name="peso" type="double">    <column name="peso"/>   </property>   <property generated="never" lazy="false" name="jh" type="double">    <column name="jh"/>   </property>   <property generated="never" lazy="false" name="fh" type="double">    <column name="fh"/>   </property>   <set name="alimentos" table="referencia_alimento"  inverse="false"  access="field">    <key not-null="true">     <column name="id_referencia" />     </key>    <many-to-many column="id_alimento" unique="true" class="innopckg.alimento" />   </set>  </class> </hibernate-mapping> 

i hope can me because can not find solution


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -