These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: sql-query not found when in mapping file with no class
PostPosted: Tue Aug 22, 2006 12:39 pm 
Newbie

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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.