0
我學習SonataAdminBundle本教程: http://sftuts.com/doc/jobeet/en/the-admin-generator空值
代替,但是:
我有空值:
而且在形式上,我只提交按鈕,但如果我點擊這個按鈕th en我有錯誤:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'type' cannot be null
也許是更好的教程SonataAdminBundle?
編輯:
<?php
//src/SfTuts/JobeetBundle/Admin/CategoryAdmin.php
namespace SfTuts\JobeetBundle\Admin;
use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
class CategoryAdmin extends Admin
{
protected $list = array(
'id' => array('identifier' => true),
'name',
);
protected $form = array(
'name',
);
protected $filter = array(
'name',
);
}
你可以分享你的管理類的代碼? – Amit
我更新了我的問題 –