Skip to content

Fix #6291 MongoDb polymorphic projection casing with conventions#9247

Open
michaelstaib wants to merge 1 commit intomainfrom
mst/issue-6291
Open

Fix #6291 MongoDb polymorphic projection casing with conventions#9247
michaelstaib wants to merge 1 commit intomainfrom
mst/issue-6291

Conversation

@michaelstaib
Copy link
Member

Fixes #6291

Summary

  • add a regression test for MongoDB projections with abstract/interface polymorphic lists under CamelCaseElementNameConvention
  • fix MongoDB field path resolution for polymorphic members by resolving unknown members against registered known derived type class maps
  • this ensures derived fields (for example dogProp1, catProp1) are projected with the correct Mongo element names

Test Commands

  • dotnet test src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/HotChocolate.Data.MongoDb.Projections.Tests.csproj --filter "FullyQualifiedName~Issue6291ReproTests"
    • Passed on net8.0, net9.0, net10.0
  • dotnet test src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/HotChocolate.Data.MongoDb.Projections.Tests.csproj --no-build
    • Passed on net8.0, net9.0, net10.0 (31 tests per target framework)

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

Fusion Gateway Performance Results

Simple Composite Query

Req/s Err%
Constant 2 (50 VUs) 3318.84 0.00%
Ramping 2 (0-500-0 VUs) 3880.99 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 1.15ms 12.13ms 14.80ms 23.96ms 33.43ms 252.66ms
Ramping 2 1.07ms 50.86ms 56.44ms 99.41ms 142.31ms 295.65ms

Deep Recursion Query

Req/s Err%
Constant 2 (50 VUs) 791.77 0.00%
Ramping 2 (0-500-0 VUs) 928.14 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 9.51ms 55.03ms 61.01ms 78.68ms 96.50ms 771.24ms
Ramping 2 2.79ms 205.20ms 222.83ms 459.06ms 513.66ms 866.63ms

Variable Batching Throughput

Req/s Err%
Constant 2 (50 VUs) 5790.71 0.00%
Ramping 2 (0-500-0 VUs) 5249.99 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 0.15ms 8.04ms 8.53ms 14.23ms 17.51ms 64.33ms
Ramping 2 0.18ms 39.26ms 43.74ms 81.11ms 106.23ms 228.28ms

Runner 2 = benchmarking-2

Run 22487278554 • Commit a50fada • Fri, 27 Feb 2026 13:09:55 GMT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ObjectType<T> classes which implements interface or abstract class are not respecting mongo conventions

1 participant