File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes one to many mapping Spring Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
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
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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.


GenRocket - Experts at Building Test Data
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 ?
 
 
subject: one to many mapping Spring Hibernate