Symfony2-首选_选项返回错误

Symfony2-首选_选项返回错误,symfony,Symfony,我想在我的实体表单中使用首选选项: public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('id','entity', array( 'class'=>'GameShelf\UsersBundle\Entity\OwnState', 'property' => 'name', 'attr' =>

我想在我的实体表单中使用
首选选项

public function buildForm(FormBuilderInterface $builder, array $options) {
    $builder->add('id','entity', array(
        'class'=>'GameShelf\UsersBundle\Entity\OwnState',
        'property' => 'name',
        'attr' => array('class'=>'chzn-select selectBig', 'data-placeholder'=>'Mam...'),
        'label' => ' ',
        'empty_value' => '',
        'preferred_choices' => array($options['selected'])
    ));
}

public function getDefaultOptions(array $options) {
    return array(
        'data_class' => 'GameShelf\UsersBundle\Entity\OwnState',
        'selected' => 1
    );
}
但它返回一个错误:
警告:spl\u object\u hash()期望参数1是给定的整数对象。我的错误在哪里?

尝试用getDefaultOptions()中的完整实体对象替换(int)1

()