avoid exception when saving empty associations