Hi,
I have these xml files:
Code:
<hibernate-mapping package="br.atech.atendeCOS.model" default-lazy="false">
<class name="Perfil" table="TB_DESCRICAO_PERFIL" schema="ADMCOS">
<id name="codigo" type="short">
<column name="COD_PERFIL" precision="3" scale="0" />
<generator class="increment" />
</id>
<property name="descricao" type="string">
<column name="DESC_PERFIL" length="50" not-null="true" />
</property>
<bag name="funcionalidades" table="TB_PERMISSAO_PERFIL">
<key column="COD_PERFIL" not-null="false" />
<many-to-many class="Funcionalidade">
<column name="NOME_FUNCAO" />
<column name="COD_SISTEMA" />
</many-to-many>
</bag>
</class>
</hibernate-mapping>
Code:
<hibernate-mapping package="br.atech.atendeCOS.model" default-lazy="false">
<class name="Funcionalidade" table="TB_FUNCIONALIDADE" schema="ADMCOS">
<composite-id>
<key-property name="nome" type="string">
<column name="NOME_FUNCAO" length="30" />
</key-property>
<key-property name="sistema" type="short">
<column name="COD_SISTEMA" precision="3" scale="0" />
</key-property>
</composite-id>
<many-to-one name="sistema" class="Sistema" update="false" insert="false">
<column name="COD_SISTEMA" precision="3" scale="0" not-null="true" />
</many-to-one>
</class>
</hibernate-mapping>
In my model, TB_PERMISSAO_PERFIL is an association table.
When I try to create a SessionFactory using Hibernate Tools I receive the error: "org.hibernate.MappingException:component class not found: br.atech.atendeCOS.model.Funcionalidade"
What is wrong with my many-to-many mapping?
Thanks,
Andre