getOrSet

inline fun <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)

Throws

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