changes to better support string-based primary key ids on model.