i have gwt application connect to postgres DB at the backend, and a java class \'Judgement\' mapping the table \'judgements\' in DB, when i tried to persistent a judgement i
Using the GeneratedValue and GenericGenerator with the native strategy:
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "id_native")
@GenericGenerator(name = "id_native", strategy = "native")
@Column(name = "id", updatable = false, nullable = false)
private Long id;
I had to create a sequence call hibernate_sequence as Hibernate looks up for such a sequence by default:
create sequence hibernate_sequence start with 1 increment by 50;
grant usage, select on all sequences in schema public to my_user_name;