Maybe I'm still missing something, but that code doesn't appear to make any use of the relation at all. All it's doing is finding a relation by `relation.key == key` and using `relation.key` and nothing else. `key` could have been used by itself, as in the example in my previous comment.