I am developping a java application with postgresql database, I made a manual insert into a table, and now when i try to insert from the application I get the following error:
Detail: Key (id)=(1092770) already exists
I am using eclipseLink as JPA framework and the Id generation strategy is the following:
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name="ID")
protected long id = 0L;
Clearly the eclipseLink is not considering the max(Id) in the table, and creates an Id less than the current max(Id).
Is there a way to fix this please
Thanks