学说:提交时行太大

时间:2016-08-28 08:06:39

标签: mysql orm doctrine-orm symfony

我有一个类,大​​约有100个字段。

最近我添加了一个新字段:

/**
 *
 * @ORM\Entity
 * @Vich\Uploadable
 * @ORM\Entity(repositoryClass="My\VenderBundle\Repository\PersonRepository")
 * @ORM\Table(name="my_vendor_person")
 */
class Person
{
    ....

    /**
     * My new property
     *
     * @var array $references
     *
     * @ORM\Column(name="references", type="array", nullable=true)
     */
    protected $references;

表单类型已相应更新:

class PersonInvitationType extends AbstractType
{
    private $context;

    /**
     * PersonNewType constructor.
     * @param AuthorizationChecker $securityContext
     */
    public function __construct(AuthorizationChecker $securityContext)
    {
        $this->context = $securityContext;

    }

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('references', CollectionType::class, array(
                'entry_type' => Referencese::class,
                'label' => 'References',
                'allow_add' => true,
                'allow_delete' => true,
                'prototype' => true,
                'prototype_name' => 'references__name__',
                'by_reference' => false,
                'required' => false
            ))

但是现在我在提交包含类Person的所有字段的表单时收到以下错误:

An exception occurred while executing 'UPDATE my_vendor_person 
SET references = ? WHERE id = ?' with params 
["a:1:{s:7:\"myProperty0\";a:4:{s:4:\"name\";s:7:\"my name\";s:6:\"location\";
s:9:\"my location\";s:5:\"phone\";s:8:\"90898978978\";s:5:\"email\";
s:17:\"myemail@gmail.com\";}}", 765]:

在此之下,陈述如下:

QLSTATE[42000]: Syntax error or access violation: 1118 Row size too large 
(> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or 
ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored 
inline.

表单包含更多类型为array的字段,其中包含的信息比上面的示例更多。有人知道这里发生了什么?我正在运行Symfony 3。

更新

请在这里找到dev.log的pastbin:http://pastebin.com/0qLm60x7

第二次更新:

请在此处找到create table声明:http://pastebin.com/PFy5jAbx

0 个答案:

没有答案