Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Mapping a jdk 1.5 java.util.Collection in hibernate 3  RSS feed

 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
My pojo has an object as:

private Collection<Name> diffNames;

where Name is a custom class as follows:
public class Name
{
private String name;
private String surname;
}

So how do i map the diffNames object above in the hibernate mapping?
 
ranger
Sheriff
Posts: 17314
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recommend using a Hibernate Bag object. a Bag is how Hibernate maps to a Collection object.

Mark
 
I was born with webbed fish toes. This tiny ad is my only friend:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!