Introducing flatMap on Result and relations without ID references