org.hibernate.annotations
Annotation Type MapKey


@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface MapKey

Define the map key columns as an explicit column holding the map key This is completly different from MapKey which use an existing column This annotation and MapKey are mutually exclusive

Author:
Emmanuel Bernard

Optional Element Summary
 Column[] columns
           
 java.lang.Class targetElement
          Represent the key class in a Map Only useful if the collection does not use generics
 Type type
          The optional map key type.
 

columns

public abstract Column[] columns
Default:
{}

targetElement

public abstract java.lang.Class targetElement
Represent the key class in a Map Only useful if the collection does not use generics

Default:
void.class

type

public abstract Type type
The optional map key type. Guessed if default

Default:
@org.hibernate.annotations.Type(type="")