Configuration file snippet:
<id name="id">
<generator class="native"></generator>
</id>
Error details:
Hibernate: insert into student (id, name) values (null, ?)
hibernate.exception.ConstraintViolationException: could not insert: [fh.model.Student]
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'id' cannot be null
Solutions;
hibernate.exception.ConstraintViolationException: Primary key constraint exception!
The primary key id of the table student is not caused by automatic growth!