We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4900f06 commit cb53d04Copy full SHA for cb53d04
src/FluentNHibernate/Mapping/ClassMap.cs
@@ -691,7 +691,11 @@ string GetDefaultTableName()
691
if (EntityType.IsGenericType)
692
{
693
// special case for generics: GenericType_GenericParameterType
694
- tableName = EntityType.Name.Substring(0, EntityType.Name.IndexOf('`'));
+ var genericQuoteIndex = EntityType.Name.IndexOf('`');
695
+ if (genericQuoteIndex >= 0)
696
+ {
697
+ tableName = EntityType.Name.Substring(0, genericQuoteIndex);
698
+ } // else generic declaration not directly in this class
699
700
foreach (var argument in EntityType.GetGenericArguments())
701
0 commit comments