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)
![](https://images2018.cnblogs.com/blog/782772/201806/782772-20180621223815454-2140020358.png)
![](https://images2018.cnblogs.com/blog/782772/201806/782772-20180621223823178-1379449211.png)
改为
成功:
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:
查询的时候有个属性跟表里的字段不符合,没有完全匹配上.
随机推荐
- [机器学习入门篇]-Logistic函数与Softmax函数
1.Logistic函数 在维基百科中,对logistic函数这样介绍道: A logistic function or logistic curve is a common "S" ...
- python执行方式及变量
.python执行方式 (1)交互式:调试方便,无法保存代码 (2)命令行方式:可以永久保存代码 (3)python执行阶段 先启动python解释器,解释器像文本编辑器一样将文件内容从硬盘读到内存, ...
- python学习—几个简单小程序
1. 输出1到100的偶数 #!/usr/bin/env python # -*- coding:utf-8 -*- #定义初始值 start=1 while True: #判断start的值若其为5 ...
- BZOJ2587 : [Ceoi2011]Team
将球员按限制从大到小排序,那么最优解中每支球队都是一个连续的区间. 设$f[i]$表示前$i$大的球员成功组队时,最多能组的队伍数,$g[i]$表示此时最大人数的最小值. 那么$f[i]=\max(f ...
- HTML(一)
html基本结构 一个html的基本结构如下: <!DOCTYPE html> <html lang="en"> <head> <meta ...
- C++程序设计方法3:自动类型转换
方法1:在源类中定义目标类型转换运算符 #include <iostream> using namespace std; class Dst { public: Dst() { cout ...
- innerHTML innerText与outerHTML间的区别
innerHTML与innerText及outerHTML间的区别最容易使初学者搞混淆,为了更好的使读者区分开.下面我就通过一个demo来解释: 代码: <!DOCTYPE html>&l ...
- PAT Basic 1001
1001 害死人不偿命的(3n+1)猜想 (15 分) 卡拉兹(Callatz)猜想: 对任何一个正整数 n,如果它是偶数,那么把它砍掉一半:如果它是奇数,那么把 (3n+1) 砍掉一半.这样一直反复 ...
- WebApi升级到2.0以后的XmlDocumentationProvider
using System; using System.Globalization; using System.Linq; using System.Reflection; using System.W ...
- db2性能优化
性能优化概述 DB2 的性能优化可以从三个方面分析:内存,CPU 和 I/O .DB2 性能优化是一件较为复杂的综合性的工作 , 需要对问题的根源作全方位的探索和思考.同时也需要较深厚的数据库管理经验 ...