Skip to content

Commit 50d34b0

Browse files
committed
fix: default option loaddbvalues
1 parent c284ed9 commit 50d34b0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ public class JsonApiOptions
4848
/// Whether or not database values should be included by default
4949
/// for resource hooks. Ignored if EnableResourceHooks is set false.
5050
///
51-
/// Defaults to <see langword="true"/>.
51+
/// Defaults to <see langword="false"/>.
5252
/// </summary>
53-
public bool LoadDatabaseValues { get; set; } = true;
53+
public bool LoadDatabaseValues { get; set; } = false;
5454

5555
/// <summary>
5656
/// The base URL Namespace

src/JsonApiDotNetCore/Hooks/Execution/HookExecutorHelper.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ public HashSet<TEntity> LoadDbValues<TEntity>(IEnumerable<TEntity> entities, Res
106106

107107
bool ShouldLoadDbValues(DependentType entityType, ResourceHook hook)
108108
{
109+
if (hook == ResourceHook.BeforeImplicitUpdateRelationship) return true;
110+
109111
var discovery = GetHookDiscovery(entityType);
110112

111113
if (discovery.DatabaseDiffDisabledHooks.Contains(hook))

0 commit comments

Comments
 (0)