Feature1400 - Use hash to identify join requests

Can you change this to raw SQL? Doesn't seem to hard to do.
Faster and less error-prone in the future if we don't use the models here.