I want to generate a unique ticket ID for my tickets. But how to let doctrine generate a unique id?
/** * @ORMColumn(name="id", type="integer") * @ORMId() * @ORMGeneratedValue(strategy="AUTO") */ protected $id;
little more explain:
As of version 2.3, you can just add the following annotations to your property:
/** * @ORMColumn(type="guid") * @ORMId * @ORMGeneratedValue(strategy="UUID") */ protected $id;
1.4m articles
1.4m replys
5 comments
56.9k users