Mutation of many active models #2613
Unanswered
Jacob-32587
8000
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
When using SeaORM I often need to perform bulk mutations and end up using the below template for each entity that needs this kind of behavior. I wanted to avoid needing to make multiple database calls for each active model so I created custom logic for updating/deleting multiple active models. This is super easy but I hate the idea of duplicating code everywhere, I tried to mess around with generics and trait bounds for about an hour (i.e. using a
Option<Vec<IntoActiveModel<M>>>
) but was unsuccessful.Questions
to a PR implementing this functionality?
ActiveModel
/ types that implementIntoActiveModel
. I wanted to ask before sinking any more time into it.Beta Was this translation helpful? Give feedback.
All reactions