fix for passing model relations as IDs to model constructor