orangy06/28/2017, 8:57 PM
instance from database and keep it around for the duration of HttpRequest?
vonox706/28/2017, 9:28 PM
. 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:
db.from(Post::class).where(userId = userId).findAll()
val Call.user by lazy<User> = db.from(User::class).where(userId = userId).findFirst()
orangy06/28/2017, 9:31 PM