Skip to content

[MEVD] Can't set IsAutoGenerated property of VectorStoreKeyAttribute at compile time #13697

@adamsitnik

Description

@adamsitnik

The following code fails to compile:

[VectorStoreKey(StorageName = "name", IsAutoGenerated = true)]
public Guid Key { get; set; }

Because the IsAutoGenerated is bool?:

Which in C# maps to System.Nullable<bool> (a struct) and can't be set at compile time.

Could we make it just a bool like what it's mapped to at the end?

Context: https://github.com/dotnet/extensions/pull/7423/changes#r2974567816

cc @roji

Metadata

Metadata

Labels

msft.ext.vectordataRelated to Microsoft.Extensions.VectorData

Type

No type

Projects

Status

Sprint: Done

Relationships

None yet

Development

No branches or pull requests

Issue actions