10
Is there a sea-orm equivalent to findOrCreate? How else would I do this?
(programming.dev)
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Credits
I have never used sea-orm, but I wonder if
.on_conflictcould be used to simplify the code above?This is likely what OP will have to do. It actually looks like ANSI SQL now has merge, but you can scroll down a bit and see how each DB handles it slightly differently if you don't use merge.
I think I had that in a few attempts, I can't remember why I removed it. Thanks for pointing this out.