Skip to content

Commit 3ca8437

Browse files
Alexander Zoghebweaverryan
Alexander Zogheb
authored andcommitted
Fix typo in doctrine mapping config for annotations. Update Doctrine2 overview page.
1 parent 8b22f08 commit 3ca8437

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

guides/doctrine/orm/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Explicit definition of all the mapped entities is the only necessary
5656
configuration for the ORM and there are several configuration options that you
5757
can control. The following configuration options exist for a mapping:
5858

59-
- ``type`` One of "annotations", "xml", "yml", "php" or "static-php". This
59+
- ``type`` One of "annotation", "xml", "yml", "php" or "static-php". This
6060
specifies which type of metadata type your mapping uses.
6161
- ``dir`` Path to the mapping or entity files (depending on the driver). If
6262
this path is relative it is assumed to be relative to the bundle root. This

guides/doctrine/orm/overview.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,15 @@ write mapping information with annotations, XML, or YAML:
8888
namespace Sensio\HelloBundle\Entity;
8989
9090
/**
91+
* @orm:Table()
9192
* @orm:Entity
9293
*/
9394
class User
9495
{
9596
/**
9697
* @orm:Id
9798
* @orm:Column(type="integer")
98-
* @orm:GeneratedValue(strategy="IDENTITY")
99+
* @orm:GeneratedValue(strategy="AUTO")
99100
*/
100101
protected $id;
101102
@@ -115,7 +116,7 @@ write mapping information with annotations, XML, or YAML:
115116
id:
116117
type: integer
117118
generator:
118-
strategy: IDENTITY
119+
strategy: AUTO
119120
fields:
120121
name:
121122
type: string
@@ -131,7 +132,7 @@ write mapping information with annotations, XML, or YAML:
131132
132133
<entity name="Sensio\HelloBundle\Entity\User" table="user">
133134
<id name="id" type="integer" column="id">
134-
<generator strategy="IDENTITY"/>
135+
<generator strategy="AUTO"/>
135136
</id>
136137
<field name="name" column="name" type="string" length="255" />
137138
</entity>

0 commit comments

Comments
 (0)