for more background depth, the kid objects are defined in code (C# using the MongoDB.Driver), & the “_id” field in the class is just a string, with the BsonId decorator. Thus, the actual _id field in the db is unique per parent, but not (necessarily) unique across parents.
I tried working out a query in MongoDb Playground, but it didn’t work, as expected. However, it revealed potentially the cause of the problem with the following error:
Invalid query:
Line 5: Invalid ObjectId: hash has to be 24 char long
I also looked for a way to convert the ObjectId ot a string & compare to the string in the query, but that didn’t work either.
Do I have to update the database to use the ObjectId/BsonId correctly before being able to query like I would like (ie, not comparing to an ObjectId/BsonId, but a separate field/property)?