kubele
02/28/2024, 2:24 PMJohan
02/28/2024, 2:57 PMJohan
02/28/2024, 2:59 PMdany giguere
02/29/2024, 10:49 PM// oneToMany relationship query example
suspend fun findByIdWithImages(id: Long): PostWithImagesDto? = coroutineScope {
val post = async{findById(id)}
val images = async{imageRepository.findByPostId(id)?.toList()}
return@coroutineScope post.await()?.toPostWithImagesDto()?.copy(images = images.await())
}