• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

One to Many relationship Error. Please guide.

 
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.


 
author and cow tipper
Posts: 5000
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.....

 
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic