-->
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: must have same number of columns as the referenced primary k
PostPosted: Sat May 23, 2009 3:35 pm 
Newbie

Joined: Sat May 23, 2009 3:22 pm
Posts: 1
Error: Foreign key (FKA316D7532FBBA1DE:usr_trad.tb_ctrl_arq_entrada [ID_EXECUCAO,NM_ARQ_ENTRADA])) must have same number of columns as the referenced primary key (usr_trad.tb_ctrl_arq_saida [fk_id_execucao,fk_nm_arq_entrada,NM_ARQ_SAIDA])

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="vo">
<class name="RelArqsFluxoVO" table="usr_trad.tb_ctrl_arq_saida">
<!-- Propriedades da Classe -->

<composite-id>
<key-property name="idExecucao" column="fk_id_execucao" ></key-property>
<key-property name="nmArquivoEntrada" column="fk_nm_arq_entrada"></key-property>
<key-property name="nmArquivoSaida" column="NM_ARQ_SAIDA"/>
<!-- <key-property name="idExecucao" column="fk_id_execucao" />
<key-property name="nmArquivoEntrada" column="fk_nm_arq_entrada" />
<key-property name="nmArquivoSaida" column="NM_ARQ_SAIDA"/> -->
</composite-id>
<property name="txtStatusSaida" column="TXT_STATUS" />

<!-- bi-directional many-to-one association to TbFluxo -->


<join table="usr_trad.tb_ctrl_arq_entrada" fetch="join">
<key>
<column name="ID_EXECUCAO" />
<column name="NM_ARQ_ENTRADA" />
</key>

<property name="dtExecucao" column="DT_EXECUCAO" />
<property name="fkIdFluxo" column="FK_ID_FLUXO" insert="false"
update="false" />
<property name="nmOrigem" column="NM_ORIGEM" />
<property name="txtStatusEnt" column="TXT_STATUS" />

<many-to-one name="fluxo"
class="FluxoVO" not-null="true">
<column name="FK_ID_FLUXO" />
</many-to-one>

</join>

</class>
</hibernate-mapping>


I tried use many-to-one association instead of using join table, but I got error: Duplicate Path (both Im using criteria, and I cant change it).


thanks


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.