posted 18 years ago
hi, I'm new to Hibernate, and I'm running into a bit of problem when specifying my mappings.
Currently I have a UserBean class:
and my UserBean mapping file looks like:
my RankingBean class looks like:
and RankingBean's mapping file is:
so, the error i'm getting says :
INFO - Reading mappings from resource: com/uwa/beans/UserBean.hbm.xml
INFO - Mapping class: com.uwa.beans.UserBean -> tblUser
INFO - Mapping collection: com.uwa.beans.UserBean.events -> tblParticipate
INFO - Configured SessionFactory: null
INFO - Mapping collection: com.uwa.beans.UserBean.loans -> tblLoan
INFO - Mapping collection: com.uwa.beans.UserBean.rankings -> tblRanking
org.hibernate.MappingException: Repeated column in mapping for entity: com.uwa.beans.RankingBean column: userID (should be mapped with insert="false" update="false")
at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:605)
...
I'm wondering if someone could tell me what the error is, because I seem to already have duplicated column="userID" in the events and loans collection mapping and it didn't complain there? thanks
[ October 30, 2006: Message edited by: Vince Lee ]
[Edited to include code tags - Paul Sturrock]
[ October 30, 2006: Message edited by: Paul Sturrock ]