Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.0.1
-
Fix Version/s: 1.1.0
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
From the mailgroup:
Say I have a Vacancy which can be related to another Vacancy.
Given a class
class Vacancy [ .... ]
and an association:
association Vacancy vacancy many -> many Vacancy relatedVacancies;
the following Hibernate mapping is generated:
<class name="Vacancy" optimistic-lock="version" table="Vacancy_TABLE"> <cache usage="read-write"/> <id column="id" name="id" type="java.lang.Long"> <generator class="native"/> </id> ........... <set name="relatedVacancies" table="Vacancy_Vacancy"> <key column="Vacancy_ID" not-null="true"/> <many-to-many class="Vacancy" column="Vacancy_ID"/> </set> </class>
Since the column "Vacancy_ID" is used twice in this definition, you would need a table "Vacancy_Vacancy" with two "Vacancy_ID" columns which is kinda impossible. I can probably workaround this by introducing a RelatedVacancy domain object, but I'd rather not ![]()
I'm currently using the workaround:
But empty business classes causes an in issue in the data contract.