sea-orm
sea-orm copied to clipboard
Json field to support BTreeMap and HashMap
Discussed in https://github.com/SeaQL/sea-orm/discussions/2356
Originally posted by kudlatyamroth September 13, 2024 I have struct like this:
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, FromJsonQueryResult)]
pub struct Component {
base_price: Decimal,
component_type: String,
}
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "product")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub name: String,
pub component_list: BTreeMap<String, Component>,
}
as of now it says i need to implement TryGetable
Hi @Huliiiiii May I take this one?
@denyszhak Sorry for the late reply, of course.