Open
Description
Hi, I am trying to use Mongo and Bson derived traits while having some of the fields remain handled by serde in order to have customized serialization/de-serialization for that field.
I have a very basic example here:
#[derive(Debug, Serialize, Deserialize)]
pub struct MySerdeType {
embedded_attr: String
}
#[derive(Debug, Bson, Mongo)]
#[mongo(collection = "my_docs", field, filter, update)]
pub struct MyDoc {
mongo_attr: String,
#[mongo(serde)]
#[bson(serde)]
serde_attr: MySerdeType
}
Unfortunately, this fails to compile due to 'no field serde_attr
on type my_doc::Update
'.
If I remove the update attribute, then this compiles, but the model will not implement the AsUpdate or Update traits. Is this expected? Thanks!