Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

hbm file returning wrong result

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have two tables related and I built two hbm files.
The relation between tables are one-to-many.
Everything worked fine but I discovered that I am only getting one record from the many table, and I'm sure that I should be getting more thant one record from the many side.

As you can see I've used a Set with a relation of one-to-many.
Do I have something wrong?

Many Impl Class



Main hbm file


Impl class that is called from the first hbm file



Hbm file of Impl class that is called from the first hbm file



Does any one knows what is the problem?

Could any one help?

Many Thanks,
Rui Felix
[ October 01, 2008: Message edited by: Rui Felix ]
 
Rui Felix
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got the problem fixed.

Just needed to specify the table's primary key correctly. My primary key was three attributes and I only had one specified on hibernate.

Many Thanks,
Regards,
Rui Felix
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic