Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 5f6d758

Browse files
committed
typo on where, throw away duplicate names to avoid compile issues.
1 parent 1f982d1 commit 5f6d758

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/T4/OrmLite.Core.ttinclude

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ class SqlServerSchemaReader : SchemaReader
992992
using (var cmd=_factory.CreateCommand())
993993
{
994994
cmd.Connection=_connection;
995-
cmd.CommandText=string.Format(@"SELECT name,CAST(is_nullable as VARCHAR(1)) is_nullable,system_type_name FROM sys.dm_exec_describe_first_result_set_for_object(OBJECT_ID('{0}'), 1) WHERE is_hidden = 1",sp.SchemaQualifiedName);
995+
cmd.CommandText=string.Format(@"SELECT name,CAST(is_nullable as VARCHAR(1)) is_nullable,system_type_name FROM sys.dm_exec_describe_first_result_set_for_object(OBJECT_ID('{0}'), 1) WHERE is_hidden = 0",sp.SchemaQualifiedName);
996996
using (IDataReader rdr=cmd.ExecuteReader())
997997
{
998998
while(rdr.Read())
@@ -1009,7 +1009,7 @@ class SqlServerSchemaReader : SchemaReader
10091009
{
10101010
param.DotNetType = GetNullablePropertyType(rdr["system_type_name"].ToString());
10111011
}
1012-
result.Add(param);
1012+
if (!result.Any(t=>t.Name == param.Name)) result.Add(param);
10131013
}
10141014
}
10151015
}

0 commit comments

Comments
 (0)