File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

one to many mapping Spring Hibernate

 
vivien siu
Ranch Hand
Posts: 143
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
vivien siu
Ranch Hand
Posts: 143
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
never mind it's ok already. I solved it
[ August 02, 2006: Message edited by: vivien siu ]
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 278
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this something you have missing entry for <many-to-one> in the mapping file of com.tm.wsbs.batch.model.Infraservices ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic