码迷,mamicode.com
首页 > 其他好文 > 详细

could not resolve property: leader_id of: pojo.Project

时间:2018-06-21 23:46:30      阅读:289      评论:0      收藏:0      [点我收藏+]

标签:ade   lis   cte   criterion   wal   str   sub   imp   join   

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

标签:ade   lis   cte   criterion   wal   str   sub   imp   join   

原文地址:https://www.cnblogs.com/zhaocundang/p/9211270.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!