add reference field to entity