This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes one to many mapping Spring Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "one to many mapping Spring Hibernate" Watch "one to many mapping Spring Hibernate" New topic
Author

one to many mapping Spring Hibernate

vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
hi I need some help on this:
One prod_id in the Product table will have many prod_id in the Infra_services table. But somehow I'm getting only one row of data from Infra_services table everytime.

here's my mapping files:




and the java bean files will be:


Can someone point out how I'm suppose to get multiple rows of data finstead of just one row? Thanks!


I'm not available, my BF's name is WORK.
vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
never mind it's ok already. I solved it
[ August 02, 2006: Message edited by: vivien siu ]
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

I am so glad you solved the problem. But why not share your solution with everyone else? That way, we can all learn from one another.

Also, it would seem that this question is only about Hibernate, so I am moving this to our ORM forum.

Thanks.
Ghulam Rashid
Ranch Hand

Joined: Jan 14, 2002
Posts: 278
Is this something you have missing entry for <many-to-one> in the mapping file of com.tm.wsbs.batch.model.Infraservices ?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: one to many mapping Spring Hibernate
 
Similar Threads
one-to-many relation
data insert error
Error running the application
how can i join two different table
Hibernate generated query for a inheritance mapping