could not resolve property: leader_id of: pojo.Project
https://www.cnblogs.com/zhaocundang/p/9211270.html
hibernate 双向1对多 出现问题
外键解析错误!
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
1
Exception in thread "main" org.hibernate.QueryException: could not resolve property: leader_id of: pojo.Project
at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:67)
at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:61)
at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassPropertyTableNumber(AbstractEntityPersister.java:1392)
at org.hibernate.persister.entity.BasicEntityPropertyMapping.toColumns(BasicEntityPropertyMapping.java:54)
at org.hibernate.persister.entity.AbstractEntityPersister.toColumns(AbstractEntityPersister.java:1367)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumns(CriteriaQueryTranslator.java:457)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumnsUsingProjection(CriteriaQueryTranslator.java:417)
at org.hibernate.criterion.SimpleExpression.toSqlString(SimpleExpression.java:68)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.java:357)
at org.hibernate.loader.criteria.CriteriaJoinWalker.<init>(CriteriaJoinWalker.java:113)
at org.hibernate.loader.criteria.CriteriaJoinWalker.<init>(CriteriaJoinWalker.java:82)
at org.hibernate.loader.criteria.CriteriaLoader.<init>(CriteriaLoader.java:91)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1578)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
at test.test.main(test.java:55)



改为

成功:

could not resolve property: leader_id of: pojo.Project的更多相关文章
- nested exception is org.hibernate.QueryException: could not resolve property
SSH框架出现了下面的错误: nested exception is org.hibernate.QueryException: could not resolve property 检查了hbm.x ...
- org.hibernate.QueryException: could not resolve property
org.hibernate.QueryException: could not resolve property HibernateSQLXML org.hibernate.QueryExcepti ...
- many to one could not resolve property
今天在做一个功能的时候 遇到了.一个Could not resolve property 的问题. 配置文件如下: <many-to-one name="user" cla ...
- org.hibernate.QueryException: could not resolve property: address of:
Hibernate: select count(*) as y0_ from test.course this_ org.hibernate.QueryException: could not res ...
- could not resolve property问题(ssh框架)
could not resolve property不能解析属性问题, 刚开始把hql语句中的"from User user where user.user_name = '"+u ...
- could not resolve property
could not resolve property(无法解析属性) 顾名思义在写hql语句的时候,属性写错了! 请检查大小写,是实体类的,不是数据库表的! 一个一个检查,仔细看!
- 常见Hibernate报错处理:出现“org.hibernate.QueryException: could not resolve property”和 is not mapped和could not locate named parameter错误的解决
正确写法: @Override @SuppressWarnings("unchecked") public List<Device> queryOSDevice(Str ...
- could not resolve property(无法解析属性)
could not resolve property(无法解析属性) 顾名思义在写hql语句的时候,属性写错了! 请检查大小写,是实体类的,不是数据库表的! 一个一个检查,仔细看!
- Hibernate-org.hibernate.QueryException: could not resolve property: code of:
查询的时候有个属性跟表里的字段不符合,没有完全匹配上.
随机推荐
- python3.6.5 + selenium +VS Code 运行报错:Unable to find a matching set of capabilities的解决
在python3.6.5 + selenium +VS Code 环境中,在class的__init__ 方法初始化火狐浏览器时出现以下错误: 发生异常: selenium.common.except ...
- redis(四)
hash hash用于存储对象,对象的格式为键值对 命令 设置 设置单个属性 HSET key field value 设置多个属性 HMSET key field value [field valu ...
- python网络编程(一)
socket简介 1.本地的进程间通信(IPC)有很多种方式,例如 队列 同步(互斥锁.条件变量等) 以上通信方式都是在一台机器上不同进程之间的通信方式,那么问题来了 网络中进程之间如何通信? 2. ...
- NOIP考试各种技巧!!
考前时间利用对考生起着至关重要的作用,不容忽视! 一.考前几分钟时间,往往能决定成败,所以一定要做好心态调整.不要去想结果,只看过程,努力了就一定不会白费.二.在别人紧张.坐立不安的时候,你不妨把时间 ...
- linux查看服务安装目录
linux查看服务安装目录server dir 假如我们想查看 Redis 的安装目录 如果用命令 which redis 或者 whereis redis 都找不到安装目录, 可使用以下办法: ps ...
- 打开沙盒文件iOS
有时使用数据库是需要查看或者更换沙盒里的数据库等文件 那么如何拿到真机的沙盒 查看真机沙盒教程 打开Devices 在xcode的上部导航栏里,选择window -> Devices and S ...
- 3ds max学习笔记(十六)-- 摄像机
摄像机添加以及应用技巧:可以更改观察的视点和空间广阔,模拟景深和运动模糊效果: 1,添加:更改观察的角度和位置,增加场景透视感: 基本操作: 景深:
- 通过echarts的demo
通过最近两天对echarts的了解,下面用echarts.js写了一个小效果: 效果的demo为: <!DOCTYPE html> <html lang="en" ...
- 国内阿里maven仓库镜像maven配置文件maven仓库速度快
国内连接maven官方的仓库更新依赖库,网速一般很慢,收集一些国内快速的maven仓库镜像以备用. 最新更新:2016年11月11日 18:05:40 阿里云提供Maven私服,我把配置文件贴一下,自 ...
- MySQL出现Access denied for user ‘root’@’localhost’ (using password:YES)
连接时MySQL出现了下面的错误: Access denied for user ‘root’@’localhost’ (using password:YES) 解决的办法是先停止MySQL服务,在m ...