test hasJoin relation.