Correct transform code for base entity, add additional fields.