fix time.Time fields not being saved

via adding a special case in the `serializeIDs` function (in document_internals.go)
This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-03-27 16:02:22 -04:00
parent 11d31fbbc1
commit d328bc3fbd
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -83,10 +83,14 @@ func serializeIDs(input interface{}) interface{} {
}
}
} else {
if fv.Type() == reflect.TypeFor[time.Time]() {
ret0[bbson.Name] = fv.Interface()
} else {
ret0[bbson.Name] = serializeIDs(fv.Interface())
}
}
}
ret = ret0
}