title: Initialise immutable JPA collection in database
body: <p>My domain contains FieldValidator objects, that have sub classes EmailValidator, SizeValidator etc. There is only one instance of FieldValidator per subclass.</p>
  
  <pre><code>@Entity
  @Immutable
  @Table(name = "FIELD_VALIDATOR")
  @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
  @DiscriminatorColumn(name = "TYPE")
  public abstract class FieldValidator extends AbstractEntity implements IFieldValidator{
  
      @Column(unique=true, name="TYPE")
      public String type;
  
      public String name;
      public String argumentName;
  
      //To override by subclasses
      public abstract Optional&lt;CustomError&gt; run(FieldConstraint constraint);
  
      /**
      * Constructor, getters and setters omitted
      */
  }
  </code></pre>
  
  <p>Example subclass</p>
  
  <pre><code>@Entity
  @DiscriminatorValue("DATE_BEFORE")
  public class DateBeforeValidator extends FieldValidator {
      public DateBeforeValidator() {
          super("Date", "Before");
      }
  
      public Optional&lt;CustomError&gt; run(FieldConstraint constraint) {
          //TODO
      }
  }
  </code></pre>
  
  <p>Example subclass</p>
  
  <pre><code>@Entity
  @DiscriminatorValue("SIZE_MIN")
  public class SizeMinValidator extends FieldValidator {
  
      public SizeMinValidator() {
          super("Size", "Minimum");
      }
  
      public Optional&lt;CustomError&gt; run(FieldConstraint constraint) {
          //TODO
      }
  }
  </code></pre>
  
  <p>How can I initialise the FIELD_VALIDATOR table with one entity per FieldValidator subclass? I need ensure that: the FIELD_VALIDATOR table is immutable (no other data can be added or deleted to/from the table), each FieldValidator entity is unique and immutable (the @Column(unique=true) and the @Immutable annotations should do the trick).</p>