Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.5
  Go To Table Of Contents


Use @ExcludeDefaultMappings to specify that no default mapping should be added to a specific class. Instead, EclipseLink will use only mappings that are explicitly defined by annotations or the XML mapping file.

Annotation Elements

There are no elements for this annotation.


You can specify @ExcludeDefaultMappings on an Entity, MappedSuperclass, or Embeddable class.


Example 2-40 shows how to use the @ExcludeDefaultMapping annotation.

Example 2-40 Using the @ExcludeDefaultMappings Annotation

public class Dealer {
    private long id;
    private String name;
    // These would be ignored
    private List<Card> deck;
    private List<Card> hand;

See Also

For more information, see: