From: NHibernate J. <mik...@us...> - 2007-06-04 13:24:59
|
Misleading SQL Query on exception --------------------------------- Key: NH-1029 URL: http://jira.nhibernate.org/browse/NH-1029 Project: NHibernate Type: Bug Components: Data Providers Versions: 1.2.0.GA Reporter: Ayende Rahien If NHibernate has encountered an error when processing a query, it reports the "conceptual" SQL, and not the real SQL sent to the DB in the exception. Example, it reports: CanMakeCriteriaQueryAcrossBothAssociationsWhenBothAssoicationsHasSameColumnKeyNameAndUsingPaging' failed: NHibernate.ADOException : could not execute query [ SELECT this_.Id as Id0_2_, this_.Name as Name0_2_, this_.Name1 as Name3_0_2_, this_.Name2 as Name4_0_2_, this_.Name3 as Name5_0_2_, this_.Name4 as Name6_0_2_, this_.Name5 as Name7_0_2_, this_.Name6 as Name8_0_2_, this_.Name7 as Name9_0_2_, ships4_.SomeVeryLongItemId as SomeVery1___4_, s1_.Id as Ship4_, s1_.Id as Id3_0_, s1_.Name as Name3_0_, containers6_.SomeVeryLongItemId as SomeVery1___4_, c2_.Id as Container4_, c2_.Id as Id4_1_, c2_.Name as Name4_1_ FROM Item this_ inner join ShipsToItems ships4_ on this_.Id=ships4_.SomeVeryLongItemId inner join Ship s1_ on ships4_.Ship=s1_.Id left outer join ContainersToItems containers6_ on this_.Id=containers6_.SomeVeryLongItemId left outer join Container c2_ on containers6_.Container=c2_.Id WHERE s1_.Id = ? and c2_.Id = ? ] Positional parameters: 0 15 0 15 Where the real query is: WITH query AS (SELECT TOP 2 ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __hibernate_row_nr__, this_.Id as Id0_2_, this_.Name as Name0_2_, this_.Name1 as Name3_0_2_, this_.Name2 as Name4_0_2_, this_.Name3 as Name5_0_2_, this_.Name4 as Name6_0_2_, this_.Name5 as Name7_0_2_, this_.Name6 as Name8_0_2_, this_.Name7 as Name9_0_2_, ships4_.SomeVeryLongItemId as SomeVery1___4_, s1_.Id as Ship4_, s1_.Id as Id3_0_, s1_.Name as Name3_0_, containers6_.SomeVeryLongItemId as SomeVery1___4_, c2_.Id as Container4_, c2_.Id as Id4_1_, c2_.Name as Name4_1_ FROM Item this_ inner join ShipsToItems ships4_ on this_.Id=ships4_.SomeVeryLongItemId inner join Ship s1_ on ships4_.Ship=s1_.Id left outer join ContainersToItems containers6_ on this_.Id=containers6_.SomeVeryLongItemId left outer join Container c2_ on containers6_.Container=c2_.Id WHERE s1_.Id = @p0 and c2_.Id = @p1) SELECT * FROM query WHERE __hibernate_row_nr__ > 0 ORDER BY __hibernate_row_nr__ The WITH was crucial to understand what the problem was, and NH didn't report it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: NHibernate J. <mik...@us...> - 2007-09-21 21:42:01
|
[ http://jira.nhibernate.org/browse/NH-1029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Koshcheyev updated NH-1029: ---------------------------------- Fix Version/s: LATER > Misleading SQL Query on exception > --------------------------------- > > Key: NH-1029 > URL: http://jira.nhibernate.org/browse/NH-1029 > Project: NHibernate > Issue Type: Bug > Components: Data Providers > Affects Versions: 1.2.0.GA > Reporter: Ayende Rahien > Priority: Major > Fix For: LATER > > > If NHibernate has encountered an error when processing a query, it reports the "conceptual" SQL, and not the real SQL sent to the DB in the exception. > Example, it reports: > CanMakeCriteriaQueryAcrossBothAssociationsWhenBothAssoicationsHasSameColumnKeyNameAndUsingPaging' > failed: NHibernate.ADOException : could not execute query > [ SELECT this_.Id as Id0_2_, this_.Name as Name0_2_, this_.Name1 as Name3_0_2_, this_.Name2 as Name4_0_2_, this_.Name3 as Name5_0_2_, this_.Name4 as Name6_0_2_, this_.Name5 as Name7_0_2_, this_.Name6 as Name8_0_2_, this_.Name7 as Name9_0_2_, ships4_.SomeVeryLongItemId as SomeVery1___4_, s1_.Id as Ship4_, s1_.Id as Id3_0_, s1_.Name as Name3_0_, containers6_.SomeVeryLongItemId as SomeVery1___4_, c2_.Id as Container4_, c2_.Id as Id4_1_, c2_.Name as Name4_1_ FROM Item this_ inner join ShipsToItems ships4_ on this_.Id=ships4_.SomeVeryLongItemId inner join Ship s1_ on ships4_.Ship=s1_.Id left outer join ContainersToItems containers6_ on this_.Id=containers6_.SomeVeryLongItemId left outer join Container c2_ on containers6_.Container=c2_.Id WHERE s1_.Id = ? and c2_.Id = ? ] > Positional parameters: 0 15 > 0 15 > Where the real query is: > WITH query AS (SELECT TOP 2 ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __hibernate_row_nr__, this_.Id as Id0_2_, this_.Name as Name0_2_, this_.Name1 as Name3_0_2_, this_.Name2 as Name4_0_2_, this_.Name3 as Name5_0_2_, this_.Name4 as Name6_0_2_, this_.Name5 as Name7_0_2_, this_.Name6 as Name8_0_2_, this_.Name7 as Name9_0_2_, ships4_.SomeVeryLongItemId as SomeVery1___4_, s1_.Id as Ship4_, s1_.Id as Id3_0_, s1_.Name as Name3_0_, containers6_.SomeVeryLongItemId as SomeVery1___4_, c2_.Id as Container4_, c2_.Id as Id4_1_, c2_.Name as Name4_1_ FROM Item this_ inner join ShipsToItems ships4_ on this_.Id=ships4_.SomeVeryLongItemId inner join Ship s1_ on ships4_.Ship=s1_.Id left outer join ContainersToItems containers6_ on this_.Id=containers6_.SomeVeryLongItemId left outer join Container c2_ on containers6_.Container=c2_.Id WHERE s1_.Id = @p0 and c2_.Id = @p1) SELECT * FROM query WHERE __hibernate_row_nr__ > 0 ORDER BY __hibernate_row_nr__ > The WITH was crucial to understand what the problem was, and NH didn't report it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: NHibernate J. <nh...@gm...> - 2008-09-30 12:44:16
|
[ http://jira.nhibernate.org/browse/NH-1029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-1029: ---------------------------- Fix Version/s: (was: 2.1.0.Alpha1) > Misleading SQL Query on exception > --------------------------------- > > Key: NH-1029 > URL: http://jira.nhibernate.org/browse/NH-1029 > Project: NHibernate > Issue Type: Bug > Components: DataProviders / Dialects > Affects Versions: 1.2.0.GA > Reporter: Ayende Rahien > Priority: Major > > If NHibernate has encountered an error when processing a query, it reports the "conceptual" SQL, and not the real SQL sent to the DB in the exception. > Example, it reports: > CanMakeCriteriaQueryAcrossBothAssociationsWhenBothAssoicationsHasSameColumnKeyNameAndUsingPaging' > failed: NHibernate.ADOException : could not execute query > [ SELECT this_.Id as Id0_2_, this_.Name as Name0_2_, this_.Name1 as Name3_0_2_, this_.Name2 as Name4_0_2_, this_.Name3 as Name5_0_2_, this_.Name4 as Name6_0_2_, this_.Name5 as Name7_0_2_, this_.Name6 as Name8_0_2_, this_.Name7 as Name9_0_2_, ships4_.SomeVeryLongItemId as SomeVery1___4_, s1_.Id as Ship4_, s1_.Id as Id3_0_, s1_.Name as Name3_0_, containers6_.SomeVeryLongItemId as SomeVery1___4_, c2_.Id as Container4_, c2_.Id as Id4_1_, c2_.Name as Name4_1_ FROM Item this_ inner join ShipsToItems ships4_ on this_.Id=ships4_.SomeVeryLongItemId inner join Ship s1_ on ships4_.Ship=s1_.Id left outer join ContainersToItems containers6_ on this_.Id=containers6_.SomeVeryLongItemId left outer join Container c2_ on containers6_.Container=c2_.Id WHERE s1_.Id = ? and c2_.Id = ? ] > Positional parameters: 0 15 > 0 15 > Where the real query is: > WITH query AS (SELECT TOP 2 ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __hibernate_row_nr__, this_.Id as Id0_2_, this_.Name as Name0_2_, this_.Name1 as Name3_0_2_, this_.Name2 as Name4_0_2_, this_.Name3 as Name5_0_2_, this_.Name4 as Name6_0_2_, this_.Name5 as Name7_0_2_, this_.Name6 as Name8_0_2_, this_.Name7 as Name9_0_2_, ships4_.SomeVeryLongItemId as SomeVery1___4_, s1_.Id as Ship4_, s1_.Id as Id3_0_, s1_.Name as Name3_0_, containers6_.SomeVeryLongItemId as SomeVery1___4_, c2_.Id as Container4_, c2_.Id as Id4_1_, c2_.Name as Name4_1_ FROM Item this_ inner join ShipsToItems ships4_ on this_.Id=ships4_.SomeVeryLongItemId inner join Ship s1_ on ships4_.Ship=s1_.Id left outer join ContainersToItems containers6_ on this_.Id=containers6_.SomeVeryLongItemId left outer join Container c2_ on containers6_.Container=c2_.Id WHERE s1_.Id = @p0 and c2_.Id = @p1) SELECT * FROM query WHERE __hibernate_row_nr__ > 0 ORDER BY __hibernate_row_nr__ > The WITH was crucial to understand what the problem was, and NH didn't report it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: NHibernate J. <nh...@gm...> - 2008-10-15 13:53:37
|
[ http://jira.nhibernate.org/browse/NH-1029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ayende Rahien reassigned NH-1029: --------------------------------- Assignee: Ayende Rahien > Misleading SQL Query on exception > --------------------------------- > > Key: NH-1029 > URL: http://jira.nhibernate.org/browse/NH-1029 > Project: NHibernate > Issue Type: Bug > Components: DataProviders / Dialects > Affects Versions: 1.2.0.GA > Reporter: Ayende Rahien > Assignee: Ayende Rahien > Priority: Major > > If NHibernate has encountered an error when processing a query, it reports the "conceptual" SQL, and not the real SQL sent to the DB in the exception. > Example, it reports: > CanMakeCriteriaQueryAcrossBothAssociationsWhenBothAssoicationsHasSameColumnKeyNameAndUsingPaging' > failed: NHibernate.ADOException : could not execute query > [ SELECT this_.Id as Id0_2_, this_.Name as Name0_2_, this_.Name1 as Name3_0_2_, this_.Name2 as Name4_0_2_, this_.Name3 as Name5_0_2_, this_.Name4 as Name6_0_2_, this_.Name5 as Name7_0_2_, this_.Name6 as Name8_0_2_, this_.Name7 as Name9_0_2_, ships4_.SomeVeryLongItemId as SomeVery1___4_, s1_.Id as Ship4_, s1_.Id as Id3_0_, s1_.Name as Name3_0_, containers6_.SomeVeryLongItemId as SomeVery1___4_, c2_.Id as Container4_, c2_.Id as Id4_1_, c2_.Name as Name4_1_ FROM Item this_ inner join ShipsToItems ships4_ on this_.Id=ships4_.SomeVeryLongItemId inner join Ship s1_ on ships4_.Ship=s1_.Id left outer join ContainersToItems containers6_ on this_.Id=containers6_.SomeVeryLongItemId left outer join Container c2_ on containers6_.Container=c2_.Id WHERE s1_.Id = ? and c2_.Id = ? ] > Positional parameters: 0 15 > 0 15 > Where the real query is: > WITH query AS (SELECT TOP 2 ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __hibernate_row_nr__, this_.Id as Id0_2_, this_.Name as Name0_2_, this_.Name1 as Name3_0_2_, this_.Name2 as Name4_0_2_, this_.Name3 as Name5_0_2_, this_.Name4 as Name6_0_2_, this_.Name5 as Name7_0_2_, this_.Name6 as Name8_0_2_, this_.Name7 as Name9_0_2_, ships4_.SomeVeryLongItemId as SomeVery1___4_, s1_.Id as Ship4_, s1_.Id as Id3_0_, s1_.Name as Name3_0_, containers6_.SomeVeryLongItemId as SomeVery1___4_, c2_.Id as Container4_, c2_.Id as Id4_1_, c2_.Name as Name4_1_ FROM Item this_ inner join ShipsToItems ships4_ on this_.Id=ships4_.SomeVeryLongItemId inner join Ship s1_ on ships4_.Ship=s1_.Id left outer join ContainersToItems containers6_ on this_.Id=containers6_.SomeVeryLongItemId left outer join Container c2_ on containers6_.Container=c2_.Id WHERE s1_.Id = @p0 and c2_.Id = @p1) SELECT * FROM query WHERE __hibernate_row_nr__ > 0 ORDER BY __hibernate_row_nr__ > The WITH was crucial to understand what the problem was, and NH didn't report it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: NHibernate J. <nh...@gm...> - 2008-10-15 14:59:54
|
[ http://jira.nhibernate.org/browse/NH-1029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ayende Rahien closed NH-1029. ----------------------------- Resolution: Fixed In 3858 > Misleading SQL Query on exception > --------------------------------- > > Key: NH-1029 > URL: http://jira.nhibernate.org/browse/NH-1029 > Project: NHibernate > Issue Type: Bug > Components: DataProviders / Dialects > Affects Versions: 1.2.0.GA > Reporter: Ayende Rahien > Assignee: Ayende Rahien > Priority: Major > > If NHibernate has encountered an error when processing a query, it reports the "conceptual" SQL, and not the real SQL sent to the DB in the exception. > Example, it reports: > CanMakeCriteriaQueryAcrossBothAssociationsWhenBothAssoicationsHasSameColumnKeyNameAndUsingPaging' > failed: NHibernate.ADOException : could not execute query > [ SELECT this_.Id as Id0_2_, this_.Name as Name0_2_, this_.Name1 as Name3_0_2_, this_.Name2 as Name4_0_2_, this_.Name3 as Name5_0_2_, this_.Name4 as Name6_0_2_, this_.Name5 as Name7_0_2_, this_.Name6 as Name8_0_2_, this_.Name7 as Name9_0_2_, ships4_.SomeVeryLongItemId as SomeVery1___4_, s1_.Id as Ship4_, s1_.Id as Id3_0_, s1_.Name as Name3_0_, containers6_.SomeVeryLongItemId as SomeVery1___4_, c2_.Id as Container4_, c2_.Id as Id4_1_, c2_.Name as Name4_1_ FROM Item this_ inner join ShipsToItems ships4_ on this_.Id=ships4_.SomeVeryLongItemId inner join Ship s1_ on ships4_.Ship=s1_.Id left outer join ContainersToItems containers6_ on this_.Id=containers6_.SomeVeryLongItemId left outer join Container c2_ on containers6_.Container=c2_.Id WHERE s1_.Id = ? and c2_.Id = ? ] > Positional parameters: 0 15 > 0 15 > Where the real query is: > WITH query AS (SELECT TOP 2 ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __hibernate_row_nr__, this_.Id as Id0_2_, this_.Name as Name0_2_, this_.Name1 as Name3_0_2_, this_.Name2 as Name4_0_2_, this_.Name3 as Name5_0_2_, this_.Name4 as Name6_0_2_, this_.Name5 as Name7_0_2_, this_.Name6 as Name8_0_2_, this_.Name7 as Name9_0_2_, ships4_.SomeVeryLongItemId as SomeVery1___4_, s1_.Id as Ship4_, s1_.Id as Id3_0_, s1_.Name as Name3_0_, containers6_.SomeVeryLongItemId as SomeVery1___4_, c2_.Id as Container4_, c2_.Id as Id4_1_, c2_.Name as Name4_1_ FROM Item this_ inner join ShipsToItems ships4_ on this_.Id=ships4_.SomeVeryLongItemId inner join Ship s1_ on ships4_.Ship=s1_.Id left outer join ContainersToItems containers6_ on this_.Id=containers6_.SomeVeryLongItemId left outer join Container c2_ on containers6_.Container=c2_.Id WHERE s1_.Id = @p0 and c2_.Id = @p1) SELECT * FROM query WHERE __hibernate_row_nr__ > 0 ORDER BY __hibernate_row_nr__ > The WITH was crucial to understand what the problem was, and NH didn't report it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |