Skip to content

Commit 200a505

Browse files
authored
Merge pull request #12148 from lucasmirloup/docs/generation-strategies-dbal-4
docs: generation strategies: differences between DBAL 3 and 4
2 parents 21e9fcb + f7d4e37 commit 200a505

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

docs/en/reference/basic-mapping.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,17 +389,19 @@ Here is the list of possible generation strategies:
389389

390390
- ``AUTO`` (default): Tells Doctrine to pick the strategy that is
391391
preferred by the used database platform. The preferred strategies
392-
are ``IDENTITY`` for MySQL, SQLite, MsSQL and SQL Anywhere and, for
393-
historical reasons, ``SEQUENCE`` for Oracle and PostgreSQL. This
394-
strategy provides full portability.
392+
are ``IDENTITY`` for MySQL, SQLite, MsSQL, SQL Anywhere and
393+
PostgreSQL (on DBAL 4) and, for historical reasons, ``SEQUENCE``
394+
for Oracle and PostgreSQL (on DBAL 3). This strategy provides
395+
full portability.
395396
- ``IDENTITY``: Tells Doctrine to use special identity columns in
396397
the database that generate a value on insertion of a row. This
397398
strategy does currently not provide full portability and is
398399
supported by the following platforms: MySQL/SQLite/SQL Anywhere
399-
(``AUTO_INCREMENT``), MSSQL (``IDENTITY``) and PostgreSQL (``SERIAL``).
400+
(``AUTO_INCREMENT``), MSSQL (``IDENTITY``) and PostgreSQL (``SERIAL``
401+
on DBAL 3, ``GENERATED BY DEFAULT AS IDENTITY`` on DBAL 4).
400402
- ``SEQUENCE``: Tells Doctrine to use a database sequence for ID
401403
generation. This strategy does currently not provide full
402-
portability. Sequences are supported by Oracle, PostgreSql and
404+
portability. Sequences are supported by Oracle, PostgreSQL and
403405
SQL Anywhere.
404406
- ``NONE``: Tells Doctrine that the identifiers are assigned (and
405407
thus generated) by your code. The assignment must take place before

docs/en/tutorials/getting-started.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ the ``id`` tag. It has a ``generator`` tag nested inside, which
534534
specifies that the primary key generation mechanism should automatically
535535
use the database platform's native id generation strategy (for
536536
example, AUTO INCREMENT in the case of MySql, or Sequences in the
537-
case of PostgreSql and Oracle).
537+
case of PostgreSQL and Oracle).
538538

539539
Now that we have defined our first entity and its metadata,
540540
let's update the database schema:
@@ -1287,7 +1287,7 @@ The console output of this script is then:
12871287
result set to retrieve entities from the database. DQL boils down to a
12881288
Native SQL statement and a ``ResultSetMapping`` instance itself. Using
12891289
Native SQL you could even use stored procedures for data retrieval, or
1290-
make use of advanced non-portable database queries like PostgreSql's
1290+
make use of advanced non-portable database queries like PostgreSQL's
12911291
recursive queries.
12921292

12931293

0 commit comments

Comments
 (0)