• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Nischal Tanna
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?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic