Hi- We are investigating upgrading from NH 1.2 to 2.0. After fixing all of the namespace changes, I am getting an error with the named queries. In 1.2 they worked fine, now I get a runtime error with the following message:
Errors in named queries: {IRI.GetAccounts}.... for all of the named queries. Below is the first named query: <query name="IRI.GetAccounts"> select r.RetailerId as Id, r.Name, b.BannerId, b.Name as BannerName, map.AccountId, 'Banner' as 'Type', names.IsMviActive as IsMviActive from IRIMapping map join IRINames names on names.Id = map.AccountId join Retailer r on r.RetailerId = map.RetailerId join Banner b on b.BannerId = map.BannerId where map.RetailerId is not null and map.BannerId is not null and map.AccountId in (select Id from IRINames where Type = :accountType) union all select r.RetailerId as Id, r.Name, '0' as BannerId, '0' as BannerName, map.AccountId, 'Retailer' as 'Type', names.IsMviActive as IsMviActive from IRIMapping map join IRINames names on names.Id = map.AccountId join Retailer r on r.RetailerId = map.RetailerId where map.RetailerId is not null and map.BannerId is null and map.AccountId in (select Id from IRINames where Type = :accountType) union all select f.FormatId as Id, f.Name, '0' as BannerId, '0' as BannerName, map.AccountId, 'Format' as 'Type', names.IsMviActive as IsMviActive from IRIMapping map join IRINames names on names.Id = map.AccountId join Format f on f.FormatId = map.FormatId where map.AccountId in (select Id from IRINames where Type = :accountType) union all select ch.ChannelId as Id, ch.Name, '0' as BannerId, '0' as BannerName, map.AccountId, 'Channel' as 'Type', names.IsMviActive as IsMviActive from IRIMapping map join IRINames names on names.Id = map.AccountId join Channel ch on ch.ChannelId = map.ChannelId where map.AccountId in (select Id from IRINames where Type = :accountType) order by Name, BannerName </query> This query runs fine in SQL 2005 Management stuido. the :accountType variables are actually done through a string replacement before running they query. Some of the queries, however do not have any variables at all, and those are still listed in the error. what changed between 1.2 and 2.0 that would cause the named queries to not work? I can't seem to find any documentation on it. Thanks Eric --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---