3.7.4.3. Example

The following example shows you how to specify extensions in metadata.

Example 100. OpenJPA Metadata Extensions
import org.apache.openjpa.persistence.*;

@Entity
@DataCache(enabled=false)
public class Magazine
{
    @ManyToMany
    @LRS
    private Collection<Subscriber> subscribers;

    @ExternalValues({"true=1", "false=2"})
    @Type(int.class)
    private boolean weekly;

    ...
}