Hello...
I have found something strange.
I am using NetBeans Hibernate plugin to configure the connection to my database.
I have one related table with many-to-many relation.
When I finished the wizard, XML mapping for the parent table contains this:
Code:
<many-to-many entity-name="agenda.Subscripcion">
<column name="SUBID" not-null="true" />
</many-to-many>
That way, when I run a query in HQL editor, I get this error:
org.hibernate.MappingException: An association from the table subscripcionescliente refers to an unmapped class: agenda.Subscripcion
when I change entity-name attribute, in order to be class attribute:
Code:
<many-to-many class="agenda.Subscripcion">
<column name="SUBID" not-null="true" />
</many-to-many>
it works.
Can you clarify me this point, please? Why did the wizard generate the incorrect attribute? Or maybe I have solved this specific problem but I could find another problem later when trying to use the relationship.
Cheers
Jaime