Customizing form - relation to another entity


#1

Hello,
I’ve added a new field to ShopUser model:

/** @var ClientCategory */
protected $clientCategory;

How do I need to modify ShopUserType form to make it handle this new field, please?

e.g. I want to update Customer (ShopUser respectively) using this request:

PATCH localhost/api/v1/customers/12
{
	"firstName": "John",
	"lastName": "Doe",
	"user": {
		"clientCategory": 5
	}
}

The docs only covers adding primitive fields to form (e.g. string), but not references to another entities like in this case. I have no idea how to tell the form that clientCategory is an ID of ClientCategory entity.
Thanks for any hints.