Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CSM Database Core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@
| Microsoft.EntityFrameworkCore | 10.0.8 | 10.0.9 |
| Microsoft.EntityFrameworkCore.SqlServer | 10.0.8 | 10.0.9 |

## [6.0.5] - 18.06-2026

### Fixes

- Fixed [DepotBase] [Update] method issue for a safe entity relation update just when the Ids are different.

#### Dependencies

| Package | Previous Version | New Version |
|:----------------------------------------|:----------------:|:---------------:|
| CSM.Foundation.Core | 4.0.0 | 4.0.0 |
| Microsoft.EntityFrameworkCore | 10.0.8 | 10.0.9 |
| Microsoft.EntityFrameworkCore.SqlServer | 10.0.8 | 10.0.9 |

## [6.0.4] - 18.06-2026

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion CSM Database Core/CSM Database Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net10.0</TargetFrameworks>
<RootNamespace>CSM_Database_Core</RootNamespace>
<PackageId>CSM.Database.Core</PackageId>
<Version>6.0.5</Version>
<Version>6.0.6</Version>
<Authors>Renato Urrea</Authors>
<Company>Cosmos (CSM)</Company>
<RepositoryUrl>https://github.com/Cosmos-CSM/csm_database</RepositoryUrl>
Expand Down
11 changes: 9 additions & 2 deletions CSM Database Core/Depots/Abstractions/Bases/DepotBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,19 @@ public async Task<UpdateOutput<TEntity>> Update(QueryInput<TEntity, UpdateInput<
object? updatedValue = flatRelation.GetValue(updateEntity);
object? currentValue = flatRelation.GetValue(trackedEntity);


if (
updatedValue != currentValue
|| (
(
updatedValue is IEntity updatedValueEntity
&& currentValue is IEntity currentValueEntity
&& updatedValueEntity.Id != currentValueEntity.Id
)
|| (
(
updatedValue is not IEntity
|| currentValue is not IEntity
)
&& updatedValue != currentValue
)
) {
flatRelation.SetValue(trackedEntity, updatedValue);
Expand Down
Loading