This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes OneToMany relationship Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "OneToMany relationship" Watch "OneToMany relationship" New topic

OneToMany relationship

Will Myers
Ranch Hand

Joined: Aug 05, 2009
Posts: 362

Hi I need some help in mapping a relationship...

my tables look like:

I'm trying to map the CurrencyHolidays as a set inside the Currency object like so:

but this is causing an exception:

I can't change the database schema so what am i doing wrong?
Will Myers
Ranch Hand

Joined: Aug 05, 2009
Posts: 362

so contrary to what this says you need to add

to the id column in the source entity
Have you checked out Aspose?
subject: OneToMany relationship
It's not a secret anymore!