求助:hibernate初始化多次加载entity问题
本人在做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次 是否被重复初始化了