You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When querying a document all references seem to have the Weak prop on SanityReference set to null.
This in turn seems to be converted into a strong reference when the document is updated.
Example:
var docSet = await _sanity.DocumentSet<Filmomtale>()
.Include(f => f.Distributor)
.Where(f => f.Id == id)
.ExecuteAsync(cancellationToken);
var doc = docSet.Single();
<... update some fields on doc, but leave Distributor reference untouched ....>
await _sanity.DocumentSet<Filmomtale>()
.Update(doc)
.CommitAsync(cancellationToken: cancellationToken);
Here "Distributor" is a reference to another document type, the schema specifies the reference as weak:
When debugging this I can see that the Weak property on the reference to Distributor is null.
After the document has been updated, Sanity Studio now shows a warning "Reference strength mismatch" for the Distributor field.
Is this a bug, or is there something else I need to do when querying to make sure the reference is returned?
EDIT: I am using 1.5.0 from NuGet
The text was updated successfully, but these errors were encountered:
When querying a document all references seem to have the Weak prop on SanityReference set to null.
This in turn seems to be converted into a strong reference when the document is updated.
Example:
Here "Distributor" is a reference to another document type, the schema specifies the reference as weak:
When debugging this I can see that the Weak property on the reference to Distributor is null.
After the document has been updated, Sanity Studio now shows a warning "Reference strength mismatch" for the Distributor field.
Is this a bug, or is there something else I need to do when querying to make sure the reference is returned?
EDIT: I am using 1.5.0 from NuGet
The text was updated successfully, but these errors were encountered: