From: neelabh (JIRA) <no...@at...> - 2006-06-02 03:43:18
|
Hibernate does not respect batch setting (annotation) on collection for loading ------------------------------------------------------------------------------- Key: HHH-1809 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1809 Project: Hibernate3 Type: Bug Components: core Versions: 3.1.3 Environment: hibernate 3.1.3 (2006.03.20) Hibernate annotation 3.1 beta 8, 20.01.2006 Reporter: neelabh Priority: Blocker I have a list of portfolios and several collections (entries, quries, permissions) mapping. The collection are set for lazy initialization. I am using hibernate annotations Bu#1 When I load portfolio first time(a list of portfolio) then entries , queries and permission are not batched for query. Infact they are queried one by one like portfolio1 entry1 permission1 query1 portfolio2 entry2 permission2 query2 Hibernate: select portfolio0_.portfolioId as portfoli1_0_0_, portfolio0_.name as name0_0_, portfolio0_.owner as owner0_0_, portfolio0_.currentDateTime as currentD4_0_0_, portfolio0_.TSportfolioId as TSportfo5_0_0_ from psPortfolio portfolio0_ where portfolio0_.portfolioId in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Hibernate: select instrument0_.portfolioId as portfoli5_1_, instrument0_.entryId as entryId1_, instrument0_.entryId as entryId2_0_, instrument0_.portfolioId as portfoli5_2_0_, instrument0_.productType as productT2_2_0_, instrument0_.quantity as quantity2_0_, instrument0_.TSproductId as TSproduc4_2_0_ from psInstrumentEntry instrument0_ where instrument0_.portfolioId=? Hibernate: select queryentri0_.portfolioId as portfoli4_1_, queryentri0_.entryId as entryId1_, queryentri0_.entryId as entryId1_0_, queryentri0_.portfolioId as portfoli4_1_0_, queryentri0_.name as name1_0_, queryentri0_.comment as comment1_0_ from psQueryEntry queryentri0_ where queryentri0_.portfolioId=? Hibernate: select portfoliop0_.portfolioId as portfoli6_1_, portfoliop0_.portfolioPermissionId as portfoli1_1_, portfoliop0_.portfolioPermissionId as portfoli1_4_0_, portfoliop0_.portfolioId as portfoli6_4_0_, portfoliop0_.partyRefType as partyRef2_4_0_, portfoliop0_.partyId as partyId4_0_, portfoliop0_.partySubType as partySub4_4_0_, portfoliop0_.accessLevel as accessLe5_4_0_ from psPortfolioPermission portfoliop0_ where portfoliop0_.portfolioId=? I am not sure what is wrong with setting however, when I delete or amend or insert are batched properly. Can you please check This is affecting performance of huge portfolio. Bug#2 Even if I wnat to initialize only entry, it loads queries and permissions both, Is there any way to prohibit using annotations. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-06-02 07:14:02
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1809?page=comments#action_23244 ] Christian Bauer commented on HHH-1809: -------------------------------------- Either you attach an _ISOLATED_ and _SIMPLE_ test case, or we will have to close this issue. > Hibernate does not respect batch setting (annotation) on collection for loading > ------------------------------------------------------------------------------- > > Key: HHH-1809 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1809 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.1.3 > Environment: hibernate 3.1.3 (2006.03.20) Hibernate annotation 3.1 beta 8, 20.01.2006 > Reporter: neelabh > Priority: Blocker > > > I have a list of portfolios and several collections (entries, quries, permissions) mapping. The collection are set for lazy initialization. I am using hibernate annotations > Bu#1 > When I load portfolio first time(a list of portfolio) then entries , queries and permission are not batched for query. Infact they are queried one by one like > portfolio1 > entry1 > permission1 > query1 > portfolio2 > entry2 > permission2 > query2 > Hibernate: select portfolio0_.portfolioId as portfoli1_0_0_, portfolio0_.name as name0_0_, portfolio0_.owner as owner0_0_, portfolio0_.currentDateTime as currentD4_0_0_, portfolio0_.TSportfolioId as TSportfo5_0_0_ from psPortfolio portfolio0_ where portfolio0_.portfolioId in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) > Hibernate: select instrument0_.portfolioId as portfoli5_1_, instrument0_.entryId as entryId1_, instrument0_.entryId as entryId2_0_, instrument0_.portfolioId as portfoli5_2_0_, instrument0_.productType as productT2_2_0_, instrument0_.quantity as quantity2_0_, instrument0_.TSproductId as TSproduc4_2_0_ from psInstrumentEntry instrument0_ where instrument0_.portfolioId=? > Hibernate: select queryentri0_.portfolioId as portfoli4_1_, queryentri0_.entryId as entryId1_, queryentri0_.entryId as entryId1_0_, queryentri0_.portfolioId as portfoli4_1_0_, queryentri0_.name as name1_0_, queryentri0_.comment as comment1_0_ from psQueryEntry queryentri0_ where queryentri0_.portfolioId=? > Hibernate: select portfoliop0_.portfolioId as portfoli6_1_, portfoliop0_.portfolioPermissionId as portfoli1_1_, portfoliop0_.portfolioPermissionId as portfoli1_4_0_, portfoliop0_.portfolioId as portfoli6_4_0_, portfoliop0_.partyRefType as partyRef2_4_0_, portfoliop0_.partyId as partyId4_0_, portfoliop0_.partySubType as partySub4_4_0_, portfoliop0_.accessLevel as accessLe5_4_0_ from psPortfolioPermission portfoliop0_ where portfoliop0_.portfolioId=? > I am not sure what is wrong with setting however, when I delete or amend or insert are batched properly. > Can you please check > This is affecting performance of huge portfolio. > Bug#2 > Even if I wnat to initialize only entry, it loads queries and permissions both, Is there any way to prohibit using annotations. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-06-02 07:14:09
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1809?page=all ] Christian Bauer updated HHH-1809: --------------------------------- Priority: Minor (was: Blocker) > Hibernate does not respect batch setting (annotation) on collection for loading > ------------------------------------------------------------------------------- > > Key: HHH-1809 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1809 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.1.3 > Environment: hibernate 3.1.3 (2006.03.20) Hibernate annotation 3.1 beta 8, 20.01.2006 > Reporter: neelabh > Priority: Minor > > > I have a list of portfolios and several collections (entries, quries, permissions) mapping. The collection are set for lazy initialization. I am using hibernate annotations > Bu#1 > When I load portfolio first time(a list of portfolio) then entries , queries and permission are not batched for query. Infact they are queried one by one like > portfolio1 > entry1 > permission1 > query1 > portfolio2 > entry2 > permission2 > query2 > Hibernate: select portfolio0_.portfolioId as portfoli1_0_0_, portfolio0_.name as name0_0_, portfolio0_.owner as owner0_0_, portfolio0_.currentDateTime as currentD4_0_0_, portfolio0_.TSportfolioId as TSportfo5_0_0_ from psPortfolio portfolio0_ where portfolio0_.portfolioId in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) > Hibernate: select instrument0_.portfolioId as portfoli5_1_, instrument0_.entryId as entryId1_, instrument0_.entryId as entryId2_0_, instrument0_.portfolioId as portfoli5_2_0_, instrument0_.productType as productT2_2_0_, instrument0_.quantity as quantity2_0_, instrument0_.TSproductId as TSproduc4_2_0_ from psInstrumentEntry instrument0_ where instrument0_.portfolioId=? > Hibernate: select queryentri0_.portfolioId as portfoli4_1_, queryentri0_.entryId as entryId1_, queryentri0_.entryId as entryId1_0_, queryentri0_.portfolioId as portfoli4_1_0_, queryentri0_.name as name1_0_, queryentri0_.comment as comment1_0_ from psQueryEntry queryentri0_ where queryentri0_.portfolioId=? > Hibernate: select portfoliop0_.portfolioId as portfoli6_1_, portfoliop0_.portfolioPermissionId as portfoli1_1_, portfoliop0_.portfolioPermissionId as portfoli1_4_0_, portfoliop0_.portfolioId as portfoli6_4_0_, portfoliop0_.partyRefType as partyRef2_4_0_, portfoliop0_.partyId as partyId4_0_, portfoliop0_.partySubType as partySub4_4_0_, portfoliop0_.accessLevel as accessLe5_4_0_ from psPortfolioPermission portfoliop0_ where portfoliop0_.portfolioId=? > I am not sure what is wrong with setting however, when I delete or amend or insert are batched properly. > Can you please check > This is affecting performance of huge portfolio. > Bug#2 > Even if I wnat to initialize only entry, it loads queries and permissions both, Is there any way to prohibit using annotations. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: neelabh (JIRA) <no...@at...> - 2006-06-06 02:46:25
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-357?page=comments#action_23266 ] neelabh commented on ANN-357: ----------------------------- Hi Christian, You can close this issue, I have found the problem. The problem is that one of the setter of collection was making association between child and parent. Example public void setChildren(List<Child> children){ childrenList=chidren; //following code was causing this problem for(Child child:Children){ child.setParent(this); } } > Hibernate does not respect batch setting (annotation) on collection for loading > ------------------------------------------------------------------------------- > > Key: ANN-357 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-357 > Project: Hibernate Annotations > Type: Bug > Environment: hibernate 3.1.3 (2006.03.20) Hibernate annotation 3.1 beta 8, 20.01.2006 > Reporter: neelabh > Priority: Minor > > > I have a list of portfolios and several collections (entries, quries, permissions) mapping. The collection are set for lazy initialization. I am using hibernate annotations > Bu#1 > When I load portfolio first time(a list of portfolio) then entries , queries and permission are not batched for query. Infact they are queried one by one like > portfolio1 > entry1 > permission1 > query1 > portfolio2 > entry2 > permission2 > query2 > Hibernate: select portfolio0_.portfolioId as portfoli1_0_0_, portfolio0_.name as name0_0_, portfolio0_.owner as owner0_0_, portfolio0_.currentDateTime as currentD4_0_0_, portfolio0_.TSportfolioId as TSportfo5_0_0_ from psPortfolio portfolio0_ where portfolio0_.portfolioId in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) > Hibernate: select instrument0_.portfolioId as portfoli5_1_, instrument0_.entryId as entryId1_, instrument0_.entryId as entryId2_0_, instrument0_.portfolioId as portfoli5_2_0_, instrument0_.productType as productT2_2_0_, instrument0_.quantity as quantity2_0_, instrument0_.TSproductId as TSproduc4_2_0_ from psInstrumentEntry instrument0_ where instrument0_.portfolioId=? > Hibernate: select queryentri0_.portfolioId as portfoli4_1_, queryentri0_.entryId as entryId1_, queryentri0_.entryId as entryId1_0_, queryentri0_.portfolioId as portfoli4_1_0_, queryentri0_.name as name1_0_, queryentri0_.comment as comment1_0_ from psQueryEntry queryentri0_ where queryentri0_.portfolioId=? > Hibernate: select portfoliop0_.portfolioId as portfoli6_1_, portfoliop0_.portfolioPermissionId as portfoli1_1_, portfoliop0_.portfolioPermissionId as portfoli1_4_0_, portfoliop0_.portfolioId as portfoli6_4_0_, portfoliop0_.partyRefType as partyRef2_4_0_, portfoliop0_.partyId as partyId4_0_, portfoliop0_.partySubType as partySub4_4_0_, portfoliop0_.accessLevel as accessLe5_4_0_ from psPortfolioPermission portfoliop0_ where portfoliop0_.portfolioId=? > I am not sure what is wrong with setting however, when I delete or amend or insert are batched properly. > Can you please check > This is affecting performance of huge portfolio. > Bug#2 > Even if I wnat to initialize only entry, it loads queries and permissions both, Is there any way to prohibit using annotations. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-06-06 05:21:19
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-357?page=all ] Christian Bauer resolved ANN-357: --------------------------------- Resolution: Rejected > Hibernate does not respect batch setting (annotation) on collection for loading > ------------------------------------------------------------------------------- > > Key: ANN-357 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-357 > Project: Hibernate Annotations > Type: Bug > Environment: hibernate 3.1.3 (2006.03.20) Hibernate annotation 3.1 beta 8, 20.01.2006 > Reporter: neelabh > Priority: Minor > > > I have a list of portfolios and several collections (entries, quries, permissions) mapping. The collection are set for lazy initialization. I am using hibernate annotations > Bu#1 > When I load portfolio first time(a list of portfolio) then entries , queries and permission are not batched for query. Infact they are queried one by one like > portfolio1 > entry1 > permission1 > query1 > portfolio2 > entry2 > permission2 > query2 > Hibernate: select portfolio0_.portfolioId as portfoli1_0_0_, portfolio0_.name as name0_0_, portfolio0_.owner as owner0_0_, portfolio0_.currentDateTime as currentD4_0_0_, portfolio0_.TSportfolioId as TSportfo5_0_0_ from psPortfolio portfolio0_ where portfolio0_.portfolioId in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) > Hibernate: select instrument0_.portfolioId as portfoli5_1_, instrument0_.entryId as entryId1_, instrument0_.entryId as entryId2_0_, instrument0_.portfolioId as portfoli5_2_0_, instrument0_.productType as productT2_2_0_, instrument0_.quantity as quantity2_0_, instrument0_.TSproductId as TSproduc4_2_0_ from psInstrumentEntry instrument0_ where instrument0_.portfolioId=? > Hibernate: select queryentri0_.portfolioId as portfoli4_1_, queryentri0_.entryId as entryId1_, queryentri0_.entryId as entryId1_0_, queryentri0_.portfolioId as portfoli4_1_0_, queryentri0_.name as name1_0_, queryentri0_.comment as comment1_0_ from psQueryEntry queryentri0_ where queryentri0_.portfolioId=? > Hibernate: select portfoliop0_.portfolioId as portfoli6_1_, portfoliop0_.portfolioPermissionId as portfoli1_1_, portfoliop0_.portfolioPermissionId as portfoli1_4_0_, portfoliop0_.portfolioId as portfoli6_4_0_, portfoliop0_.partyRefType as partyRef2_4_0_, portfoliop0_.partyId as partyId4_0_, portfoliop0_.partySubType as partySub4_4_0_, portfoliop0_.accessLevel as accessLe5_4_0_ from psPortfolioPermission portfoliop0_ where portfoliop0_.portfolioId=? > I am not sure what is wrong with setting however, when I delete or amend or insert are batched properly. > Can you please check > This is affecting performance of huge portfolio. > Bug#2 > Even if I wnat to initialize only entry, it loads queries and permissions both, Is there any way to prohibit using annotations. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-06 17:15:21
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-357?page=all ] Emmanuel Bernard closed ANN-357: -------------------------------- > Hibernate does not respect batch setting (annotation) on collection for loading > ------------------------------------------------------------------------------- > > Key: ANN-357 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-357 > Project: Hibernate Annotations > Type: Bug > Environment: hibernate 3.1.3 (2006.03.20) Hibernate annotation 3.1 beta 8, 20.01.2006 > Reporter: neelabh > Priority: Minor > > > I have a list of portfolios and several collections (entries, quries, permissions) mapping. The collection are set for lazy initialization. I am using hibernate annotations > Bu#1 > When I load portfolio first time(a list of portfolio) then entries , queries and permission are not batched for query. Infact they are queried one by one like > portfolio1 > entry1 > permission1 > query1 > portfolio2 > entry2 > permission2 > query2 > Hibernate: select portfolio0_.portfolioId as portfoli1_0_0_, portfolio0_.name as name0_0_, portfolio0_.owner as owner0_0_, portfolio0_.currentDateTime as currentD4_0_0_, portfolio0_.TSportfolioId as TSportfo5_0_0_ from psPortfolio portfolio0_ where portfolio0_.portfolioId in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) > Hibernate: select instrument0_.portfolioId as portfoli5_1_, instrument0_.entryId as entryId1_, instrument0_.entryId as entryId2_0_, instrument0_.portfolioId as portfoli5_2_0_, instrument0_.productType as productT2_2_0_, instrument0_.quantity as quantity2_0_, instrument0_.TSproductId as TSproduc4_2_0_ from psInstrumentEntry instrument0_ where instrument0_.portfolioId=? > Hibernate: select queryentri0_.portfolioId as portfoli4_1_, queryentri0_.entryId as entryId1_, queryentri0_.entryId as entryId1_0_, queryentri0_.portfolioId as portfoli4_1_0_, queryentri0_.name as name1_0_, queryentri0_.comment as comment1_0_ from psQueryEntry queryentri0_ where queryentri0_.portfolioId=? > Hibernate: select portfoliop0_.portfolioId as portfoli6_1_, portfoliop0_.portfolioPermissionId as portfoli1_1_, portfoliop0_.portfolioPermissionId as portfoli1_4_0_, portfoliop0_.portfolioId as portfoli6_4_0_, portfoliop0_.partyRefType as partyRef2_4_0_, portfoliop0_.partyId as partyId4_0_, portfoliop0_.partySubType as partySub4_4_0_, portfoliop0_.accessLevel as accessLe5_4_0_ from psPortfolioPermission portfoliop0_ where portfoliop0_.portfolioId=? > I am not sure what is wrong with setting however, when I delete or amend or insert are batched properly. > Can you please check > This is affecting performance of huge portfolio. > Bug#2 > Even if I wnat to initialize only entry, it loads queries and permissions both, Is there any way to prohibit using annotations. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |