求助:hibernate初始化多次加载entity问题

stevencall 2016-01-11 09:38:36
本人在做springmvc + hibernate 时候 碰见奇怪的问题,

[DEBUG][16/01/11 09:37:27.940][org.hibernate.loader.entity.plan.EntityLoader-<init>] Static select for entity com.landi.entity.uaas.Dept [OPTIMISTIC]: select dept0_.DEPTNO as DEPTNO1_0_0_, dept0_.DEPTDETAIL as DEPTDETA2_0_0_, dept0_.DEPTNAME as DEPTNAME3_0_0_, dept0_.DEPTSNO as DEPTSNO4_0_0_ from DEPT dept0_ where dept0_.DEPTNO=?
[DEBUG][16/01/11 09:37:27.940][org.hibernate.loader.plan.build.internal.spaces.QuerySpacesImpl-registerQuerySpace] Adding QuerySpace : uid = <gen:0> -> org.hibernate.loader.plan.build.internal.spaces.EntityQuerySpaceImpl@62c57f55]
[DEBUG][16/01/11 09:37:27.940][org.hibernate.persister.walking.spi.MetamodelGraphWalker-visitAttributeDefinition] Visiting attribute path : deptdetail
[DEBUG][16/01/11 09:37:27.940][org.hibernate.persister.walking.spi.MetamodelGraphWalker-visitAttributeDefinition] Visiting attribute path : deptname
[DEBUG][16/01/11 09:37:27.940][org.hibernate.persister.walking.spi.MetamodelGraphWalker-visitAttributeDefinition] Visiting attribute path : deptsno
[DEBUG][16/01/11 09:37:27.940][org.hibernate.loader.plan.build.internal.FetchStyleLoadPlanBuildingAssociationVisitationStrategy-buildLoadPlan] Building LoadPlan...
[DEBUG][16/01/11 09:37:27.940][org.hibernate.loader.plan.exec.internal.LoadQueryJoinAndFetchProcessor-processQuerySpaceJoins] processing queryspace <gen:0>
[DEBUG][16/01/11 09:37:27.940][org.hibernate.loader.plan.build.spi.LoadPlanTreePrinter-logTree] LoadPlan(entity=com.landi.entity.uaas.Dept)
- Returns
- EntityReturnImpl(entity=com.landi.entity.uaas.Dept, querySpaceUid=<gen:0>, path=com.landi.entity.uaas.Dept)
- QuerySpaces
- EntityQuerySpaceImpl(uid=<gen:0>, entity=com.landi.entity.uaas.Dept)
- SQL table alias mapping - dept0_
- alias suffix - 0_
- suffixed key columns - {DEPTNO1_0_0_}


此类信息被debug出来6次 是否被重复初始化了
...全文
216 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧