Easier way to create relation from relation queries