I can't generate id value in MySQL using @Generatedvalue.
SQLException: no value for 2 parameter in exprection INSERT INTO tab(value, id) values(?, ?)
I tried to use everything what is in commentary
Code:
@Entity
public class Result {
@Id
//@GeneratedValue(strategy = GenerationType.AUTO)
//@GeneratedValue(strategy=GenerationType.IDENTITY)
//@SequenceGenerator(name="seq1", sequenceName="HIB_SEQ")
//@GeneratedValue(strategy=GenerationType.SEQUENCE, senerator="seq1") // no sequentions in MySQL - OK
//@Column(name = "id", nullable = false)
Long id;
... other field, getters, setters
}