I'm declaring a set with fot many-to-may association with:
Code:
<set name="assuntos" table="apoloes.ProcessoAssuntoProcesso" lazy="true" order-by="NUMORD">
<key>
<column name="CODSECAO"/>
<column name="CODDOC"/>
</key>
<many-to-many class="br.gov.trf2.jfes.apolo.processo.AssuntoProcesso">
<column name="CODSECAO"/>
<column name="CODASSPROC"/>
</many-to-many>
</set>
As you can see, CODSECAO is a common column to tables Processo, AssuntoProcesso and ProcessoAssuntoProcesso.
the following exception occur
org.hibernate.MappingException: Repeated column in mapping for collection: br.gov.trf2.jfes.apolo.processo.Processo.assuntos column: CODSECAO
How can I make the mapping without errors?