I'm new to Spring JPA stuff. I'm learning now. I got weird error while trying to insert data in mysql database.
I made sure that I have a the table and database setup correctly as same as my
mysql> show columns in empolyee in test;
| Field | Type | Null | Key | Default | Extra |
| id | int(6) | NO | PRI | NULL | auto_increment |
eid | int(6) | YES | | NULL | |
| name | varchar(40) | NO | | NULL | |
| role | varchar(20) | YES | | NULL | |
My entity class:-
@Entity
public class Employee extends AbstractPersistable<Long> {
private int eid;
private String name;
private String role;
public Employee(){
}
public Employee(int aeid, String aname, String arole){
eid=aeid;
name = aname;
role = arole;
}
}
Error:-
HTTP Status 500 - Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.SQLGrammarException: Table 'test.employee' doesn't exist;
nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException:
Table 'test.employee' doesn't exist
empolyeein DB andemployeein java