Have a couple of questions regarding transactions:
• it's still mandatory to use the
transaction
block even when using DAOs correct?
• when working with ktor, I saw that the sample uses the
newSuspendedTransaction
function. Is this necessary because ktor uses coroutines, or is it optional?
• If I declare the database connection in a class, can I then use the
transaction
block without passing the db as a parameter, is it handled by exposed already?
Giuliopime
11/10/2023, 3:46 PM
Additionally, let's say I wanna create a function that maps my externally visible data classes to entity classes.
Is there a way I can specify the id too in that mapping function, without having to declare the id myself in the table and keep using