javax.persistence
Annotation Type MapsId


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

The MapsId annotation is used to designate a ManyToOne or OneToOne relationship attribute that provides the mapping for an EmbeddedId primary key, an attribute within an EmbeddedId primary key, or a simple primary key of the parent entity. The value element specifies the attribute within a composite key to which the relationship attribute corresponds. If the entity’s primary key is of the same Java type as the primary key of the entity refer- enced by the relationship, the value attribute is not specified.

Since:
JPA 2.0 version.
Author:
Florent Benoit
See Also:
JPA 2.0 specification

Optional Element Summary
 String value
          (Optional) The name of the attribute within the composite key to which the relationship attribute corresponds.
 

value

public abstract String value
(Optional) The name of the attribute within the composite key to which the relationship attribute corresponds.

Default:
""


Copyright © 2007-2012 OW2 Consortium. All Rights Reserved.