Support writing both objects and literals to attributes underlying related models