Add support of entity to repository and back.