Hello.
I'm using hibernate tools to reverse engineer a database's tables into EJB 3.0 compliant objects.
In some many-to-many associations I want one of the sides not to be mapped to an entity, but rather have the other side contain a set of the primary keys belonging to the entities it has a relationship with.
For example, if I have the tables PERSON and LANGUAGE as entity tables, and PERSON_LANGUAGE as the many-to-many table containing both the primary keys of PERSON and LANGUAGE, the desired output would be an @Entity Person containig a Set<Integer> of the primary keys of the languages that person speaks.
If I place something like
<table-filter match-name="LK_.*" exclude="true" />
in reverng.xml, the reverse engineering process generates @Entity java classes for the tables mapping the many-to-many association.
Is there a way in which I can configure the reverse engineering process to obtain the result I want? Any help would be apreciated.
Thanks in advance,
Hugo Oliveira
hugom.oliveira.ext@siemens.com