getOrSet

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

Get or generate a new session instance using generator with type T (or name if specified)

Exceptions

IllegalStateException - if no session provider registered for type T (or name if specified)