Hi kbhattad,
the exception
Quote:
org.hibernate.MappingException: Repeated column in mapping for entity: my.test.pkg.GroupMember column: cId (should be mapped with insert="false" update="false")
indicates that you have mapped a column, in this case
cId, more than once.
You have it within two <many-to-one> elements:
Code:
...
<many-to-one name="Group" class="my.test.pkg.Group" update="false" insert="false" fetch="select">
<column name="fkgroup" length="128" not-null="true" />
<column name="cId" not-null="true" />
</many-to-one>
<many-to-one name="cluster" class="my.test.pkg.Cluster" update="false" insert="false" fetch="select">
<column name="cId" not-null="true" />
</many-to-one>
...
I could imagine that the second <many-to-one> association to my.test.pkg.Cluster is not needed since you should receive the value from the <many-to-one> association to my.test.pkg.Group that already gets the FK from my.test.pkg.Cluster.
CU
Froestel
P.S.: It is much easier to view your code snippets if you'd surround them in BBCode Code-Tags to make it appear formatted. Try the buttons below the subject field.