Skip to content

Conversation

damieng
Copy link
Contributor

@damieng damieng commented Jul 30, 2025

Motivation and Context

The MongoDB connector currently only supports string key types.

Description

Adds support for Guid and ObjectId key types to the MongoDB Connector.

Contribution Checklist

@damieng damieng requested a review from a team as a code owner July 30, 2025 10:42
@moonbox3 moonbox3 added the .NET Issue or Pull requests regarding .NET code label Jul 30, 2025
@damieng damieng changed the title .NET: Add support for Guid and ObjectID keys in the MongoDB Connector .Net: Add support for Guid and ObjectID keys in the MongoDB Connector Jul 30, 2025
@westey-m
Copy link
Contributor

@damieng, looks like there's still one unit test failing:

  Failed SemanticKernel.Connectors.MongoDB.UnitTests.MongoVectorStoreTests.GetCollectionWithNotSupportedKeyThrowsException [89 ms]
  Error Message:
   Assert.Throws() Failure: No exception was thrown
Expected: typeof(System.NotSupportedException)
  Stack Trace:
     at SemanticKernel.Connectors.MongoDB.UnitTests.MongoVectorStoreTests.GetCollectionWithNotSupportedKeyThrowsException() in /home/runner/work/semantic-kernel/semantic-kernel/dotnet/test/VectorData/MongoDB.UnitTests/MongoVectorStoreTests.cs:line 29
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)```

@westey-m westey-m enabled auto-merge August 15, 2025 15:41
@westey-m westey-m added this pull request to the merge queue Aug 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 15, 2025
@westey-m westey-m added this pull request to the merge queue Aug 18, 2025
Merged via the queue into microsoft:main with commit 0a98c72 Aug 18, 2025
22 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants