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
582
582
}
583
583
var typeToMap = new HashSet < System . Type > ( types ) ;
584
584
585
+ //NH-2831: always use the full name of the assembly because it may come from GAC
585
586
foreach ( System . Type type in RootClasses ( typeToMap ) )
586
587
{
587
- var mapping = NewHbmMapping ( type . Assembly . GetName ( ) . Name , type . Namespace ) ;
588
+ var mapping = NewHbmMapping ( type . Assembly . GetName ( ) . FullName , type . Namespace ) ;
588
589
MapRootClass ( type , mapping ) ;
589
590
yield return mapping ;
590
591
}
591
592
foreach ( System . Type type in Subclasses ( typeToMap ) )
592
593
{
593
- var mapping = NewHbmMapping ( type . Assembly . GetName ( ) . Name , type . Namespace ) ;
594
+ var mapping = NewHbmMapping ( type . Assembly . GetName ( ) . FullName , type . Namespace ) ;
594
595
AddSubclassMapping ( mapping , type ) ;
595
596
yield return mapping ;
596
597
}
You can’t perform that action at this time.
0 commit comments