File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/NHibernate/Mapping/ByCode Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -582,15 +582,16 @@ public IEnumerable<HbmMapping> CompileMappingForEach(IEnumerable<System.Type> ty
582582 }
583583 var typeToMap = new HashSet < System . Type > ( types ) ;
584584
585+ //NH-2831: always use the full name of the assembly because it may come from GAC
585586 foreach ( System . Type type in RootClasses ( typeToMap ) )
586587 {
587- var mapping = NewHbmMapping ( type . Assembly . GetName ( ) . Name , type . Namespace ) ;
588+ var mapping = NewHbmMapping ( type . Assembly . GetName ( ) . FullName , type . Namespace ) ;
588589 MapRootClass ( type , mapping ) ;
589590 yield return mapping ;
590591 }
591592 foreach ( System . Type type in Subclasses ( typeToMap ) )
592593 {
593- var mapping = NewHbmMapping ( type . Assembly . GetName ( ) . Name , type . Namespace ) ;
594+ var mapping = NewHbmMapping ( type . Assembly . GetName ( ) . FullName , type . Namespace ) ;
594595 AddSubclassMapping ( mapping , type ) ;
595596 yield return mapping ;
596597 }
You can’t perform that action at this time.
0 commit comments