J2ee is not mapped问题解决
来源:互联网 发布:淘宝店铺招牌是啥 编辑:程序博客网 时间:2024/06/11 07:34
今天运行程序的时候报了一个错误。
“User_Name" is not mapped问题
后来查了查,找到了原因,http://www.blogjava.net/wj110reg/articles/216180.htm
public List<User> findByNameAndPass(String name, String pass)
{
System.out.println(name + pass);
return (List<User>)getHibernateTemplate().find("from User where User_Name = ? and User_Pass = ?"
, new String[]{name , pass});
}
看User,之前的是
public List<User> findByNameAndPass(String name, String pass)
{
System.out.println(name + pass);
return (List<User>)getHibernateTemplate().find("from User_Table where User_Name = ? and User_Pass = ?"
, new String[]{name , pass});
}
User 是我定义的类,User_Table 是我对应的持久化后数据库里面的表,因为hibernate查询的时候是用类名,不是表名。所以改成表名就对了。
- J2ee is not mapped问题解决
- class is not mapped 和 Unknown entity问题解决
- table is not mapped
- Hibernate Is Not Mapped
- is not mapped 问题
- (Hibernate) is not mapped
- is not mapped [from
- is not mapped
- table is not mapped
- Hibernate - is not mapped
- dictHsCode is not mapped
- table is not mapped
- is not mapped [from ***]
- 错误:is not mapped
- is not mapped nhibernate
- Is Not Mapped
- "table" is not mapped 解决方法
- "table" is not mapped 解决方法
- 【黑马程序员】 学习笔记 - Java新技术 - 反射
- 线程取消(pthread_cancel)
- HLSL GLSL CG着色语言比较
- shell脚本设置登陆环境变量
- 扑克游戏
- J2ee is not mapped问题解决
- MongoDB:4种插入数据的方法
- socket编程复习(2)
- MySQL的数据库引擎的类型
- C语言结构体--对齐说明
- scp 库文件不小心整错目录导致ssh telnet 服务不可用了
- ORA-12154: TNS: could not resolve the connect identifier specified
- WiMi-net使用小结
- Vim 配置插件 --ubuntu《备忘》