-->
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: Problem -> FK referencing composite PK being Collections
PostPosted: Wed Aug 23, 2006 5:10 pm 
Newbie

Joined: Fri Apr 15, 2005 9:22 am
Posts: 11
I'm getting the following error, looked for how to solve it but I cant

Quote:
SFA_LISTA_PRECIOS_TIPOS_SOLICI [id_Tipo_solicitud,id_Lista_Precio])) must have same number of columns as the referenced primary key (SFA_TIPO_SOLICITUD [id_Tipo_solicitud])


The HBM containing the composite-id is...

Code:
      <composite-id>
         <key-many-to-one name="listaPrecios" access="property">
            <column name="id_Lista_Precio" sql-type="NUMBER(19)" not-null="true" length="19"/>
         </key-many-to-one>
         <key-many-to-one name="tipoSolicitud" access="property">
            <column name="id_Tipo_solicitud" sql-type="NUMBER(19)" not-null="true" length="19"/>           
         </key-many-to-one>         
      </composite-id>


the other hbm referencing the PK on the HBM avobe is

Code:
      <many-to-one name="listaPreciosTipoSolicitud" class="ListaPreciosTipoSolicitud" outer-join="false" update="false" insert="false">
         <column name="id_Tipo_solicitud" sql-type="NUMBER(19)" not-null="false" length="19"/>
         <column name="id_Lista_Precio" sql-type="NUMBER(19)" not-null="true" length="19"/>
      </many-to-one>


Does anyone know how to solve this ?

Regards


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.