我的实体:
class MyEntity {
/**
* @var string
*
* @ORM\Column(name="hash", type="string", length=128, unique=true, nullable=false)
*/
protected $hash;
}
hash - 由数据库自动生成列。当我尝试在数据库中创建新记录时,我得到
“哈希”列中的空值违反非空约束
有没有机会将哈希设为只读?或禁用插入?