Skip to content
This repository was archived by the owner on Oct 9, 2026. It is now read-only.
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
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
<PackageVersion Include="coverlet.collector" Version="8.0.1" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="ChromaDotNet.Testcontainers" Version="0.1.3" />
<PackageVersion Include="ChromaDotNet.Testcontainers" Version="0.1.7" />
<PackageVersion Include="Microsoft.SemanticKernel.Core" Version="1.80.1" />
</ItemGroup>

Expand Down
7 changes: 7 additions & 0 deletions src/ChromaDB.VectorData/ChromaModelBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ protected override void ValidateKeyProperty(KeyPropertyModel keyProperty)
throw new NotSupportedException(
$"Property '{keyProperty.ModelName}' has unsupported type '{type.Name}'. Key properties must be either string or Guid.");
}

// String and Guid keys are supported by the Chroma provider, but we support auto-generation of keys only for GUIDs
if (keyProperty.IsAutoGenerated && keyProperty.Type != typeof(Guid))
{
throw new NotSupportedException(
$"Auto-generation is only supported for key properties of type Guid. Property '{keyProperty.ModelName}' has type '{keyProperty.Type.Name}'.");
}
}

// Checked when the collection object is constructed, rather than when it is first used.
Expand Down
Loading