getOrSet

inline fun <T : Any> CurrentSession.getOrSet(name: String = findName(T::class), generator: () -> T): T

Gets or generates a new session instance using generator with the type T (or name if specified)

Throws

if no session provider is registered for the type T (or name if specified)