This worked in 1.0.2.0, so I assume it's a bug in this beta.
Hibernate version: 1.2.0.Beta1
Name and version of the database you are using: SQL Server 2000
Debug level Hibernate log excerpt:
2006-10-17 08:23:09,815 [2924] DEBUG NHibernate.Connection.DriverConnectionProvider [(null)] - Obtaining IDbConnection from Driver
2006-10-17 08:23:10,106 [2924] DEBUG NHibernate.Loader.Custom.SQLCustomQuery [(null)] - starting processing of sql query [select * from (select s.StoryId as {s.StoryId}, s.CategoryId as {s.Category}, s.LanguageCode as {s.LanguageCode}, s.StoryTitle as {s.StoryTitle}, s.StoryUrl as {s.StoryUrl}, s.StorySummary as {s.StorySummary}, s.GeographicAreaId as {s.GeographicArea}, s.CustomAreaId as {s.CustomArea}, s.UserId as {s.SubmittedBy}, s.SubmittedOn as {s.SubmittedOn}, count(*) as popularity from GM_Stories s inner join GM_StoryTags st on s.StoryId = st.StoryId where s.GeographicAreaId = :areaId and s.CategoryId in (:categoryIds0_, :categoryIds1_, :categoryIds2_, :categoryIds3_, :categoryIds4_, :categoryIds5_, :categoryIds6_, :categoryIds7_) group by s.StoryId, s.CategoryId, s.LanguageCode, s.StoryTitle, s.StoryUrl, s.StorySummary, s.GeographicAreaId, s.CustomAreaId, s.UserId, s.SubmittedOn union select s.StoryId as {s.StoryId}, s.CategoryId as {s.Category}, s.LanguageCode as {s.LanguageCode}, s.StoryTitle as {s.StoryTitle}, s.StoryUrl as {s.StoryUrl}, s.StorySummary as {s.StorySummary}, s.GeographicAreaId as {s.GeographicArea}, s.CustomAreaId as {s.CustomArea}, s.UserId as {s.SubmittedBy}, s.SubmittedOn as {s.SubmittedOn}, count(*) as popularity from GM_Stories s inner join GM_StoryTags st on s.StoryId = st.StoryId where s.GeographicAreaId in (select DescendantGeographicAreaId from GM_GeographicAreaDescs d where AncestorGeographicAreaId = :areaId) and s.CategoryId in (:categoryIds0_, :categoryIds1_, :categoryIds2_, :categoryIds3_, :categoryIds4_, :categoryIds5_, :categoryIds6_, :categoryIds7_) group by s.StoryId, s.CategoryId, s.LanguageCode, s.StoryTitle, s.StoryUrl, s.StorySummary, s.GeographicAreaId, s.CustomAreaId, s.UserId, s.SubmittedOn) xx order by popularity desc, {s.StoryTitle}]
2006-10-17 08:23:10,136 [2924] DEBUG NHibernate.Loader.Custom.SQLQueryReturnProcessor [(null)] - mapping alias [s] to entity-suffix [0_]
2006-10-17 08:23:10,426 [2924] DEBUG NHibernate.Impl.SessionImpl [(null)] - flushing session
2006-10-17 08:23:10,426 [2924] DEBUG NHibernate.Impl.SessionImpl [(null)] - Flushing entities and processing referenced collections
2006-10-17 08:23:10,426 [2924] DEBUG NHibernate.Impl.SessionImpl [(null)] - Processing unreferenced collections
2006-10-17 08:23:10,456 [2924] DEBUG NHibernate.Impl.SessionImpl [(null)] - scheduling collection removes/(re)creates/updates
2006-10-17 08:23:10,456 [2924] DEBUG NHibernate.Impl.SessionImpl [(null)] - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
2006-10-17 08:23:10,456 [2924] DEBUG NHibernate.Impl.SessionImpl [(null)] - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2006-10-17 08:23:10,456 [2924] DEBUG NHibernate.Impl.SessionImpl [(null)] - dont need to execute flush
2006-10-17 08:23:10,506 [2924] DEBUG NHibernate.Util.ADOExceptionReporter [(null)] - could not execute query [select * from (select s.StoryId as StoryId8_0_, s.CategoryId as CategoryId8_0_, s.LanguageCode as Language3_8_0_, s.StoryTitle as StoryTitle8_0_, s.StoryUrl as StoryUrl8_0_, s.StorySummary as StorySum6_8_0_, s.GeographicAreaId as Geograph7_8_0_, s.CustomAreaId as CustomAr8_8_0_, s.UserId as UserId8_0_, s.SubmittedOn as Submitt10_8_0_, count(*) as popularity from GM_Stories s inner join GM_StoryTags st on s.StoryId = st.StoryId where s.GeographicAreaId = ? and s.CategoryId in (?, ?, ?, ?, ?, ?, ?, ?) group by s.StoryId, s.CategoryId, s.LanguageCode, s.StoryTitle, s.StoryUrl, s.StorySummary, s.GeographicAreaId, s.CustomAreaId, s.UserId, s.SubmittedOn union select s.StoryId as StoryId8_0_, s.CategoryId as CategoryId8_0_, s.LanguageCode as Language3_8_0_, s.StoryTitle as StoryTitle8_0_, s.StoryUrl as StoryUrl8_0_, s.StorySummary as StorySum6_8_0_, s.GeographicAreaId as Geograph7_8_0_, s.CustomAreaId as CustomAr8_8_0_, s.UserId as UserId8_0_, s.SubmittedOn as Submitt10_8_0_, count(*) as popularity from GM_Stories s inner join GM_StoryTags st on s.StoryId = st.StoryId where s.GeographicAreaId in (select DescendantGeographicAreaId from GM_GeographicAreaDescs d where AncestorGeographicAreaId = ?) and s.CategoryId in (?, ?, ?, ?, ?, ?, ?, ?) group by s.StoryId, s.CategoryId, s.LanguageCode, s.StoryTitle, s.StoryUrl, s.StorySummary, s.GeographicAreaId, s.CustomAreaId, s.UserId, s.SubmittedOn) xx order by popularity desc, StoryTitle8_0_]
System.NullReferenceException: Object reference not set to an instance of an object.
at NHibernate.Loader.Loader.ConvertITypesToSqlTypes(ArrayList nhTypes, Int32 totalSpan) in c:\net\nhibernate-1.2.0.Beta1\nhibernate\src\NHibernate\Loader\Loader.cs:line 1694
at NHibernate.Loader.Loader.GetParameterTypes(QueryParameters parameters) in c:\net\nhibernate-1.2.0.Beta1\nhibernate\src\NHibernate\Loader\Loader.cs:line 1733
at NHibernate.Loader.Loader.PrepareQueryCommand(SqlString sqlString, QueryParameters parameters, Boolean scroll, ISessionImplementor session) in c:\net\nhibernate-1.2.0.Beta1\nhibernate\src\NHibernate\Loader\Loader.cs:line 1148
at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in c:\net\nhibernate-1.2.0.Beta1\nhibernate\src\NHibernate\Loader\Loader.cs:line 391
at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in c:\net\nhibernate-1.2.0.Beta1\nhibernate\src\NHibernate\Loader\Loader.cs:line 183
at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in c:\net\nhibernate-1.2.0.Beta1\nhibernate\src\NHibernate\Loader\Loader.cs:line 1646
|