Lote no funciona con GenerationType.IDENTITY
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Necesita usar secuencia.
Ejemplo:
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "row_generator")
@SequenceGenerator(name = "row_generator", sequenceName = "db_generator", allocationSize = 1)
private Long id;