orangy
06/28/2017, 8:57 PMAuthenticatedUser
instance from database and keep it around for the duration of HttpRequest?vonox7
06/28/2017, 9:28 PMdb.from(Post::class).where(userId = userId).findAll()
.
But sometimes our User object is also needed (lets say we want to have the firstName of our user). Thats why we defined an lazy instance of it:
val Call.user by lazy<User> = db.from(User::class).where(userId = userId).findFirst()
.orangy
06/28/2017, 9:31 PM