Adds relations into models.