Set struct field to default if column is NULL #2448
AdamJSoftware
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to implement some virtual columns in an external model. However, sometimes these virtual columns are NULL, but in my struct, I have an enum which I would like to set to the value NOTEXPANDED if the field is null. I can do this using regular serde using serde_with. However, the closest I can get with regular sea_orm is sea_orms(skip) but that omits the field value even if the column is set.
Example:
Beta Was this translation helpful? Give feedback.
All reactions