I am trying to create a form with in a drop down list. The data are get from the entity. The problem is that I am getting a Expected argument of type "object", "integer" given exception.
Here is how I am trying to populate the dropdownlist in the form:
public function buildForm(FormBuilder $builder, array $options)
{
$builder->add('country', 'entity', array(
'class' => 'SciForumVersion2Bundle:Country',
'property' => 'country',
));
}
In my Entity country, I have
/**
* @ORM\Column(type="text")
*/
protected $country;
The object I am editing in the form is the user object:
$enquiry = $this->get('security.context')->getToken()->getUser();
In the user entity, I have
/**
* @ORM\Column(type="integer")
*/
protected $country;
I don't know why I am getting this error.