Fix bug where saving primaryKey-less model throws