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

来源:4-4 Query注解使用

qq_醉清风_fvILQ2

2019-01-07 15:25

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


写回答 关注

2回答

  • 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这张表?

    qq_醉清风...

    @Entity @Table(name = "T_employee") public class Employee { private Integer id; private String name; private String age;

    2019-01-18 10:01:59

    共 2 条回复 >

轻松愉快之玩转SpringData

利用Spring Data提高开发效率,提升程序员的幸福指数

34087 学习 · 119 问题

查看课程

相似问题