Replace relationship definitions to cover all the bases and so Relation plays well with Views. #1361780 by solotandem, dereine and chx. Needs followups