Unable to update object element inside another object

I have one object which is present inside another object. In parent object it is possible to set element if the element is not exist. If same thing if we try to do with child object mongo drivers throws error "Unable to determine the serialization information for … ".

Ex :
mongo document

*{*
*    "_id" : NUUID("5fbd7fe7-fe25-41d1-9152-0e49eba04d3b"),*
*    "Department" : {*
*        "DepartmentId" : "FS-11-140",*
*        "DepartmentName" : "IT",*
*        "DepartmentHead" : "XYZ",*
*    },*
*    "Location" : "India",*
*    "CollegeName" : "MMCOE",*
*}*

Query 1: [ studentCount element will get added]

 *await _clg.UpdateOneAsync(*
*                new FilterDefinitionBuilder<ClgDbModel>()*
*                    .Where(x => x.id == id),*
*                new UpdateDefinitionBuilder<ClgDbModel>()*
*                    .Set(_ => _.studentCount, 100),*
*                new UpdateOptions()*
*                {*
*                    IsUpsert = false*
*                });*

Query 2 :[Mongo driver throws exception]

* await _clg.UpdateOneAsync(*
*                new FilterDefinitionBuilder<ClgDbModel>()*
*                    .Where(x => x.id == id),*
*                new UpdateDefinitionBuilder<ClgDbModel>()*
*                    .Set(_ => _.Department.Title, "ABCD"),*
*                new UpdateOptions()*
*                {*
*                    IsUpsert = false*
*                });*

Hi,

I can’t reproduce the problem.
Your code works.