Skip to content

Commit

Permalink
Fix dotnet#18710 via proceeding with translation of non-persisted JOb…
Browse files Browse the repository at this point in the history
…ject property.
  • Loading branch information
TheFanatr committed Aug 20, 2020
1 parent e567b4d commit 8bfaf8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public virtual Expression BindProperty([NotNull] IProperty property, bool client
}

if (!clientEval
&& property.Name != EntityFrameworkCore.Metadata.Conventions.StoreKeyConvention.JObjectPropertyName
&& expression.Name.Length == 0)
{
// Non-persisted property can't be translated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Linq.Expressions;
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Microsoft.EntityFrameworkCore.Utilities;
using Newtonsoft.Json.Linq;

Expand Down Expand Up @@ -33,7 +37,8 @@ public CosmosTypeMappingSource([NotNull] TypeMappingSourceDependencies dependenc
_clrTypeMappings
= new Dictionary<Type, CosmosTypeMapping>
{
{ typeof(byte[]), new CosmosTypeMapping(typeof(byte[]), keyComparer: new ArrayStructuralComparer<byte>()) }
{ typeof(byte[]), new CosmosTypeMapping(typeof(byte[]), keyComparer: new ArrayStructuralComparer<byte>()) },
{ typeof(JObject), new CosmosTypeMapping(typeof(JObject)) }
};
}

Expand Down

0 comments on commit 8bfaf8a

Please sign in to comment.