[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] How to use @BasicMap for a HashMap whose key values are entities

Hi

I'm new to EclipseLink and I was wondering how should I use EclipseLink's
@BasicMap annotation for a map whose key value is an entity and the value is
an Integer?


Example:


@Entity class A {

  // This doesn't work, as the key is an entity
  @BasicMap
  private Map<B, Integer> myMap = new HashMap<B, Integer>();

}

@Entity
class B {
...
}