I'm trying to save 2 related models and would like to use a database transaction for this so that in case of a failure nothing is written to the database.
In Vapor 3 you could use the following:
req.transaction(on: .<#dbid#>) { conn in
// use conn as your connection
}
How can this be done in Vapor 4? Unfortunately, the documentation for transactions doesn't exist for version 4.