I'm trying to create a simple table using ebean in playframework 2.1.1 with postgresql:
@Entity
@Table(name = "user")
public class User extends Model {
@Id
public long id;
@Column(name = "email")
public String email;
}
The Ebean DDL
actually create the following:
create table user (
id bigint not null,
email varchar(255),
constraint pk_user primary key (id));
create sequence user_seq;
Why isn't
ebean
usingserial/bigserial
?Is there a different way creating the table with
serial/bigserial
(I tried using other options that I checked and none of them worked)If using a sequence (ex: user_seq) is the correct way (or rather the only way), why aren't them sequential - for example: inserted data and got id 300-350 and then 365 and then 366.. No other user is connected, this behavior was repetitive (after few inserts).
thanks:)