我正在尝试在ZF2应用程序中为Doctrine2创建实体.我的实体应该有id varchar(15)但是当我尝试创建新行时,doctrine2并没有将此ID推入数据库.
在实体生成的类中,我有:
/**
* Checkpoints
*
* @ORM\Table(name="checkpoints", uniqueConstraints{@ORM\UniqueConstraint(name="sort", columns={"sort"})}, indexes={@ORM\Index(name="country", columns={"country"})})
* @ORM\Entity
*/
class Checkpoints
{
/**
* @var string
*
* @ORM\Column(name="id", type="string", length=15, nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
// rest of the entity...
Run Code Online (Sandbox Code Playgroud)
是否需要更改以将此ID从表单传递到doctrine flush中的数据库?