Add the ID when the entity is created.