Hi Manan,
Thanks for quick response.
I tried these 2 things, but it's still not working. Removing inverse="true" didn't have any effect. But when i added not-null="true" in key, its giving error, even before i started the session. Probably at mapping time.
This is the stack trace.
Quote:
Repeated column in mapping for entity: B column: col_1 (should be mapped with insert="false" update="false") { org.hibernate.MappingException: Repeated column in mapping for entity: B column: col_1 (should be mapped with insert="false" update="false") | at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:652) | at org.hibernate.mapping.PersistentClass.checkPropertyColumnDuplication(PersistentClass.java:674) | at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:696) | at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:450) | at org.hibernate.mapping.RootClass.validate(RootClass.java:192) | at org.hibernate.cfg.Configuration.validate(Configuration.java:1102) | at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1287)
<snip>
In B.hbm.xml i am giving
insert="false" update="false"
What am i doing wrong?