问答详情
源自:4-4 Query注解使用

按照课中的做法无法取得count,ERROR: Table 'test.Employee' doesn't exist

INFO: HHH000232: Schema update complete

setup

Hibernate: 

    select

        count(1) 

    from

        Employee o

一月 07, 2019 3:23:10 下午 org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions

WARN: SQL Error: 1146, SQLState: 42S02

一月 07, 2019 3:23:10 下午 org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions

ERROR: Table 'test.Employee' doesn't exist

tearDown


提问者:qq_醉清风_fvILQ2 2019-01-07 15:25

个回答

  • qq_醉清风_fvILQ2
    2019-01-18 10:01:43

    @Entity

    @Table(name = "T_employee") 

    public class Employee {

    private Integer id;

    private String name;

    private String age;


  • qq_嬷嬷茶_0
    2019-01-09 11:15:11

    你的dataBase--test库中是否有employee这张表?