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

Commit 5cbe510

Browse files
committed
Update to System.Data.SqlClient v4.5.1
1 parent d7c74ef commit 5cbe510

File tree

8 files changed

+12
-9
lines changed

8 files changed

+12
-9
lines changed

NuGet/ServiceStack.OrmLite.Core/servicestack.ormlite.core.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<dependency id="System.Collections.NonGeneric" version="[4.3.0, )" />
2626
<dependency id="System.Xml.XmlDocument" version="[4.3.0, )" />
2727
<dependency id="System.ComponentModel.Primitives" version="[4.3.0, )" />
28-
<dependency id="System.Data.SqlClient" version="[4.4.3, )" />
28+
<dependency id="System.Data.SqlClient" version="[4.5.1, )" />
2929
<dependency id="System.ComponentModel.Annotations" version="[4.3.0, )" />
3030
<dependency id="ServiceStack.Common.Core" version="5.0.0" />
3131
</group>

NuGet/ServiceStack.OrmLite.SqlServer.Core/servicestack.ormlite.sqlserver.core.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<copyright>ServiceStack and contributors</copyright>
1919
<dependencies>
2020
<group targetFramework=".netstandard2.0">
21-
<dependency id="System.Data.SqlClient" version="[4.4.3, )" />
21+
<dependency id="System.Data.SqlClient" version="[4.5.1, )" />
2222
<dependency id="ServiceStack.OrmLite.Core" version="5.0.0" />
2323
</group>
2424
</dependencies>

NuGet/ServiceStack.OrmLite.SqlServer/servicestack.ormlite.sqlserver.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<dependency id="ServiceStack.OrmLite" version="5.0.0" />
2323
</group>
2424
<group targetFramework=".netstandard2.0">
25-
<dependency id="System.Data.SqlClient" version="[4.4.3, )" />
25+
<dependency id="System.Data.SqlClient" version="[4.5.1, )" />
2626
<dependency id="ServiceStack.OrmLite" version="5.0.0" />
2727
</group>
2828
</dependencies>

NuGet/ServiceStack.OrmLite/servicestack.ormlite.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<dependency id="System.Collections.NonGeneric" version="[4.3.0, )" />
3131
<dependency id="System.Xml.XmlDocument" version="[4.3.0, )" />
3232
<dependency id="System.ComponentModel.Primitives" version="[4.3.0, )" />
33-
<dependency id="System.Data.SqlClient" version="[4.4.3, )" />
33+
<dependency id="System.Data.SqlClient" version="[4.5.1, )" />
3434
<dependency id="System.ComponentModel.Annotations" version="[4.3.0, )" />
3535
<dependency id="ServiceStack.Common" version="5.0.0" />
3636
</group>

src/ServiceStack.OrmLite.SqlServer/ServiceStack.OrmLite.SqlServer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</PropertyGroup>
4242

4343
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
44-
<PackageReference Include="System.Data.SqlClient" Version="4.4.3" />
44+
<PackageReference Include="System.Data.SqlClient" Version="4.5.1" />
4545
<ProjectReference Include="..\ServiceStack.OrmLite\ServiceStack.OrmLite.csproj" />
4646

4747
<Reference Include="..\..\lib\netstandard2.0\ServiceStack.Interfaces.dll" />

src/ServiceStack.OrmLite.SqlServer/SqlServerOrmLiteDialectProvider.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,14 +341,17 @@ public override void PrepareParameterizedInsertStatement<T>(IDbCommand cmd, ICol
341341

342342
foreach (var fieldDef in modelDef.FieldDefinitionsArray)
343343
{
344-
if (ShouldReturnOnInsert(modelDef, fieldDef))
344+
//insertFields contains Property "Name" of fields to insert
345+
var includeField = insertFields == null || insertFields.Contains(fieldDef.Name, StringComparer.OrdinalIgnoreCase);
346+
347+
if (ShouldReturnOnInsert(modelDef, fieldDef) && (!fieldDef.AutoId || !includeField))
345348
{
346349
if (sbReturningColumns.Length > 0)
347350
sbReturningColumns.Append(",");
348351
sbReturningColumns.Append("INSERTED." + GetQuotedColumnName(fieldDef.FieldName));
349352
}
350353

351-
if (ShouldSkipInsert(fieldDef))
354+
if (ShouldSkipInsert(fieldDef) && (!fieldDef.AutoId || !includeField))
352355
continue;
353356

354357
//insertFields contains Property "Name" of fields to insert ( that's how expressions work )

src/ServiceStack.OrmLite/ServiceStack.OrmLite.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<PackageReference Include="System.Collections.NonGeneric" Version="4.3.0" />
4949
<PackageReference Include="System.Xml.XmlDocument" Version="4.3.0" />
5050
<PackageReference Include="System.ComponentModel.Primitives" Version="4.3.0" />
51-
<PackageReference Include="System.Data.SqlClient" Version="4.4.0" />
51+
<PackageReference Include="System.Data.SqlClient" Version="4.5.1" />
5252
<PackageReference Include="System.ComponentModel.Annotations" Version="4.3.0" />
5353

5454
<Reference Include="..\..\lib\netstandard2.0\ServiceStack.Interfaces.dll" />

tests/ServiceStack.OrmLite.Tests/OrmLiteSelectTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ public void Does_project_Sql_columns()
527527

528528
var q = db.From<Rockstar>()
529529
.Join<RockstarAlbum>()
530-
.GroupBy(r => new { r.Id })
530+
.GroupBy(r => new { r.Id, r.FirstName, r.LastName })
531531
.Select<Rockstar, RockstarAlbum>((r,a) => new {
532532
r.Id,
533533
Name = r.FirstName + " " + r.LastName,

0 commit comments

Comments
 (0)