JPA mapping

Ebean uses the same mapping as per the JPA specification. You can learn and use the same mapping annotations. This is generally a good part of the specification and I'd expect this part of the specification to mostly stand the test of time.

There are some aspects where JPA is generally insufficient.

Naming convention

Ebean uses a Naming convention API. This is relatively important as it typically it means we only need to specify a @Column name when the naming convention is not followed.

Similarly we tend to not require explicit use of @JoinColumn or @JoinTable as long as the naming convention is followed (which defaults to "underscore naming convention").

@Id Ebean assumes database Id generation is preferred and automatically maps to either Identity or Sequence support based on the database platform. This provides good cross database support without any extra mapping annotations.
Enum Enum mapping in JPA is poor. Ebean provides 2 better alternatives in the form of @DbEnumValue and @EnumValue. We are monitoring the progress of this issue in the JPA JIRA issue tracker.
FetchType EAGER / LAZY

JPA mapping encourages the use of FetchType.EAGER and LAZY which is contrary to Ebean's query approach which instead looks to optimise the queries per use case (and provides automatic query tuning by profiling the application).

The use of EAGER LAZY mapping annotations is generally not useful when using Ebean.

@Size and @NotNull

Ebean supports the use of javax validation annotations @Size and @NotNull.

@Size Defines the mapped column width. For example, @Size(50) is equivalent to @Column(length=50)
@NotNull Define the mapped column as non null. Equivalent to @Column(nullable = false) or @ManyToOne(optional=false).