title: INSERT with DEFAULT id doesn't work in PostgreSQL
body: <p>I tried running this statement in Postgres:</p>
  
  <pre><code>insert into field (id, name) values (DEFAULT, 'Me')
  </code></pre>
  
  <p>and I got this error:</p>
  
  <pre><code>ERROR: null value in column "id" violates not-null constraint
  </code></pre>
  
  <p>I ended up having to manually set the id. The problem with that is when my app inserts a record I get a duplicate key error. I am building a java app using Play framework and ebean ORM. So the entire schema is generated automatically by ebean. In this case, what is the best practice for inserting a record manually into my db?</p>
  
  <p>Edit:<br>
  Here is how I'm creating my Field class</p>
  
  <pre><code>@Entity
  public class Field {
      @id
      public Long id;
      public String name;
  }
  </code></pre>
  
  <p>Edit:<br>
  I checked the field_seq sequence and it looks like this:</p>
  
  <pre><code>CREATE SEQUENCE public.field_seq INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1; 
  </code></pre>
  
  <p>Edit:<br>
  Here is the generated SQL in pgAdmin III:</p>
  
  <pre><code>CREATE TABLE field
  (
    id bigint NOT NULL,
    created timestamp without time zone,
    modified timestamp without time zone,
    name character varying(255),
    enabled boolean,
    auto_set boolean,
    section character varying(17),
    input_type character varying(8),
    user_id bigint,
    CONSTRAINT pk_field PRIMARY KEY (id),
    CONSTRAINT fk_field_user_3 FOREIGN KEY (user_id)
        REFERENCES account (id) MATCH SIMPLE
        ON UPDATE NO ACTION ON DELETE NO ACTION,
    CONSTRAINT ck_field_input_type CHECK (input_type::text = ANY (ARRAY['TEXT'::character varying, 'TEXTAREA'::character varying]::text[])),
    CONSTRAINT ck_field_section CHECK (section::text = ANY (ARRAY['MAIN_CONTACT_INFO'::character varying, 'PARTICIPANT_INFO'::character varying]::text[]))
  );
  
  CREATE INDEX ix_field_user_3
    ON field
    USING btree
    (user_id);
  </code></pre>