Fix viewonly relationships with assoc tables handling