Joined: Mon Aug 07, 2006 6:40 pm Posts: 12 Location: Atlanta, GA
|
I have a sql-qery defined in a mapping file that contains no other mappings. The GetNamedQuery() call throws the following exception:
NHibernate.MappingException: Named query not known: ParentPackageOfType
at NHibernate.Impl.SessionImpl.GetNamedQuery(String queryName) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 2127
When I place the sql-query in a mapping file with a class, the query is found just fine. (workaround, but not the desired method)
I checked the assembly and the XML is embedded properly along with all other mapping files.
It appears that the NHibernate.Cfg.AssemblyHbmOrderer.GetHbmFiles() function does not return resources that do not contain a 'class','subclass' or 'joined-class' node.
UPDATE: This problem disappeared when other mapping file resources were changed for unrelated reasons. Several other mapping problems came up after that as well. Perhaps the parsing/validating unexpectedly stopped at some point and never got to the resources without classes.
|
|