-
-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for configuring the identity generation preferences
- Loading branch information
1 parent
568affa
commit 9926a4a
Showing
6 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
tests/DependencyInjection/Fixtures/config/xml/orm_identity_generation_preferences.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<srv:container xmlns="http://symfony.com/schema/dic/doctrine" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:srv="http://symfony.com/schema/dic/services" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/doctrine http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd"> | ||
|
||
<config> | ||
<dbal default-connection="default"> | ||
<connection name="default" dbname="db" /> | ||
</dbal> | ||
|
||
<orm default-entity-manager="em1"> | ||
<entity-manager name="em1"> | ||
<mapping name="YamlBundle" /> | ||
<identity-generation-preference platform="Doctrine\DBAL\Platforms\PostgreSQLPlatform">identity</identity-generation-preference> | ||
</entity-manager> | ||
<entity-manager name="em2"> | ||
<identity-generation-preference platform="Doctrine\DBAL\Platforms\PostgreSQLPlatform">sequence</identity-generation-preference> | ||
<mapping name="YamlBundle" /> | ||
</entity-manager> | ||
</orm> | ||
</config> | ||
</srv:container> |
20 changes: 20 additions & 0 deletions
20
tests/DependencyInjection/Fixtures/config/yml/orm_identity_generation_preferences.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
doctrine: | ||
dbal: | ||
default_connection: default | ||
connections: | ||
default: | ||
dbname: db | ||
|
||
orm: | ||
default_entity_manager: em1 | ||
entity_managers: | ||
em1: | ||
mappings: | ||
YamlBundle: ~ | ||
identity_generation_preferences: | ||
Doctrine\DBAL\Platforms\PostgreSQLPlatform: identity | ||
em2: | ||
mappings: | ||
YamlBundle: ~ | ||
identity_generation_preferences: | ||
Doctrine\DBAL\Platforms\PostgreSQLPlatform: sequence |