an unmapped class: com.beans.TestBeanB at
org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1285)
Resolution :
I found out that for TestBeanB there was no mapping xml. I created new xml for TestBeanB and added it to context path. This resolves the TestBeanB at the point when it referenced in TestBeanA mapping xml.
TestA xml
----
Created this mapping xml and added to the context path.
Even though I have man-tomany relationship, I can maintain one-to-many relationship from TestA (one) -> TestB (Many) by not having and reverse mapping in TestB i.e. I dont have any set/list for TestA in Class TestB.
No comments:
Post a Comment