且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

编译查询时出错:抽象模式类型“实体"是未知的

更新时间:2023-10-15 14:08:10

您应该拥有

SELECT g FROM Game g//you have game

但您使用的是game而不是Game.

@Table批注用于DB.

如果需要在JPQL中更改名称,请使用@Entity批注:@Entity(name="nameUsedInJPQL") => nameUsedInJPQL is used in your JPQL.

If you need to change the name in your JPQL, use the @Entity annotation: @Entity(name="nameUsedInJPQL") => nameUsedInJPQL is used in your JPQL.

如果您未在@Entity中指定任何内容,则使用区分大小写的Entity类名称.

If you do not specify anything in your @Entity, that the case-sensitive Entity class name is used.