Fix model changes with same primary key.