Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

One to Many relationship Error. Please guide.

 
Ajay Luthria
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to set one to many relation between a trade and trade details.
One trade object can have multiple trade details and status's.

I am getting the error:

Error reading resource: Trade.hbm.xml

Please suggest if I have overlooked anything?

Thanks a lot and much appreciated for all the help.


 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remove Trade.hbm.xml from the hibernate.cfg.xml file and see if you get the same error with TradeDetails. I'm wondering if it's just a classpath issue.

-Cameron McKenzie
 
Ajay Luthria
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cameron Wallace McKenzie wrote:Remove Trade.hbm.xml from the hibernate.cfg.xml file and see if you get the same error with TradeDetails. I'm wondering if it's just a classpath issue.

-Cameron McKenzie


Hi Cameron,

Tried what you suggested and getting this error now:



It works fine when I comment out TradeDetails.hbm.xml from the Hibernate.cfg.xml and comment out one to many relation from the Trade.hbm.xml
If I run the test harness just on the Trade,the trade is saved in the trade table.....

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic