Zee*_*mee 3 java hibernate jpa
我想知道为什么我会得到QuerySyntaxException: [Entity] is not mapped,虽然Hibernate正在记录
INFO Hibernate EntityManager 3.5.0-Final
...
INFO Binding entity from annotated class: products.model.ProductGroup
INFO Bind entity products.model.ProductGroup on table GRP
...
INFO table found: GRP
INFO columns: [grp, name, top]
Run Code Online (Sandbox Code Playgroud)
实体类看起来像
@Entity(name="GRP")
public class ProductGroup implements IdentifiableEntity {
@Id
private String grp;
private String name;
private String top;
...
}
Run Code Online (Sandbox Code Playgroud)
此行引发错误:
Query q = em.createQuery("select g from ProductGroup g");
Run Code Online (Sandbox Code Playgroud)
这都是JPA,没有Hibernate API.
| 归档时间: |
|
| 查看次数: |
4723 次 |
| 最近记录: |