Skip to content

Commit e9c74e8

Browse files
author
Xavier Jefferson
committed
Modify upsert
1 parent 97d0ae8 commit e9c74e8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Hangfire.FluentNHibernateStorage/FluentNHibernateJobStorageConnection.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public override void SetJobParameter(string id, string name, string value)
104104

105105
Storage.UseSession(session =>
106106
{
107-
session.UpsertEntity<_JobParameter>(i => i.Id == converter.Value,
107+
session.UpsertEntity<_JobParameter>(i => i.Id == converter.Value && i.Name == name,
108108
i => i.Value = value, i =>
109109
{
110110
i.Job = new _Job {Id = converter.Value};

nuspecs/Hangfire.FluentNHibernateStorage.nuspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<package>
44
<metadata>
55
<id>Hangfire.FluentNHibernateStorage</id>
6-
<version>1.1.2110</version>
6+
<version>1.1.2112</version>
77
<authors>Xavier Jefferson</authors>
88
<owners>XavierJefferson</owners>
99
<licenseUrl>https://www.gnu.org/licenses/lgpl-3.0.en.html</licenseUrl>
@@ -12,7 +12,7 @@
1212
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1313
<description>A Hangfire storage provider for SQL Server, MySQL, Oracle, DB/2, PostgreSQL, and Firebird</description>
1414
<releaseNotes>
15-
In the JobParameter table, make sure we can't store multiple rows of the same parameter name for a given job id. Added an index.
15+
In the JobParameter table, make sure we can't store multiple rows of the same parameter name for a given job id. Added an index and modified the upsert.
1616
</releaseNotes>
1717
<copyright>Copyright © 2019 Xavier Jefferson</copyright>
1818
<tags>hangfire storage provider mssql mysql oracle postgresql firebird db2</tags>

0 commit comments

Comments
 (0)