No row with the given identifier exists:
来源:互联网 发布:乔丹生涯数据场均 编辑:程序博客网 时间:2024/06/14 05:08
最近在弄一个后台项目,有用到hibernate操作数据库.写hql语句表一对一关联查询的时候报这个错误.受到了csdn上一篇博客的启发,解决了我的问题.他的博客地址:http://blog.csdn.net/eyejava/article/details/1896492
1.使用查询的hql语句
修正前:String hql="from MgjCardCommentEntity c left join c.userEntity user";
修正后:String hql="select c.id,user.id from MgjCardCommentEntity c left join c.userEntity user order by c.createTime desc";
这里只能查询出来这两张表的某些属性.我使用过right join查询,虽然不会报错但是结果集不理想.
这是我个人的总结,希望能帮到大家.有什么不正确的大家可以给我留言.
0 0
- No row with the given identifier exists
- No row with the given identifier exists
- No row with the given identifier exists
- No row with the given identifier exists
- No row with the given identifier exists:
- No row with the given identifier exists
- No row with the given identifier exists
- No row with the given identifier exists
- No row with the given identifier exists
- No row with the given identifier exists:
- no row with the given identifier exists
- No row with the given identifier exists
- No row with the given identifier exists:
- Hibernate: No row with the given identifier exists
- 遇到了 No row with the given identifier exists
- No row with the given identifier exists 解决方法
- Hibernate: No row with the given identifier exists错误
- No row with the given identifier exists 解决方法
- 【算法】桶排序
- BufferedRead @ BuferedWrite 在Socket中的问题
- Qt之窗体透明
- Android反编译
- 南昌大学大神养成计划-第一课《html》
- No row with the given identifier exists:
- 21,变量与数组在内存中存储方式
- sqlmap post注入
- Rolling cURL: PHP并发最佳实践
- 圆弧动作类
- Swift 类构造器的使用
- 如何恢复outlook 2013默认设置
- Github学习笔记3- Github flow & 创建文件
- HTML5游戏制作之路_04_来做个动画吧