Do I need to call Database.connect(dataSource) eve...
# exposed
d
Do I need to call Database.connect(dataSource) every time I create a transaction? I'm receiving errors and I'm kind of confused because I do call it after I create the datasource
It says there:
Note: Starting Exposed 0.10 executing this code more than once per db will create leaks in your application, hence it is recommended to store it for later use. For example:
object DbSettings {
val db by lazy {
Database.connect(/* setup connection */)
}
}