File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -449,12 +449,10 @@ private function completeIdGeneratorMapping(ClassMetadataInfo $class)
449
449
$ sequenceName = null ;
450
450
$ fieldName = $ class ->identifier ? $ class ->getSingleIdentifierFieldName () : null ;
451
451
452
- // Platforms that do not have native IDENTITY support need a sequence to emulate this behaviour.
453
- if ($ this ->getTargetPlatform ()->usesSequenceEmulatedIdentityColumns ()) {
452
+ if ($ this ->getTargetPlatform () instanceof Platforms \PostgreSQLPlatform) {
454
453
$ columnName = $ class ->getSingleIdentifierColumnName ();
455
454
$ quoted = isset ($ class ->fieldMappings [$ fieldName ]['quoted ' ]) || isset ($ class ->table ['quoted ' ]);
456
- $ sequencePrefix = $ class ->getSequencePrefix ($ this ->getTargetPlatform ());
457
- $ sequenceName = $ this ->getTargetPlatform ()->getIdentitySequenceName ($ sequencePrefix , $ columnName );
455
+ $ sequenceName = $ class ->getTableName () . '_ ' . $ columnName . '_seq ' ;
458
456
$ definition = array (
459
457
'sequenceName ' => $ this ->getTargetPlatform ()->fixSchemaElementName ($ sequenceName )
460
458
);
@@ -484,10 +482,10 @@ private function completeIdGeneratorMapping(ClassMetadataInfo $class)
484
482
485
483
if ( ! $ definition ) {
486
484
$ fieldName = $ class ->getSingleIdentifierFieldName ();
487
- $ sequenceName = $ class ->getSequenceName ( $ this -> getTargetPlatform () );
485
+ $ columnName = $ class ->getSingleIdentifierColumnName ( );
488
486
$ quoted = isset ($ class ->fieldMappings [$ fieldName ]['quoted ' ]) || isset ($ class ->table ['quoted ' ]);
489
-
490
- $ definition = array (
487
+ $ sequenceName = $ class -> getTableName () . ' _ ' . $ columnName . ' _seq ' ;
488
+ $ definition = array (
491
489
'sequenceName ' => $ this ->getTargetPlatform ()->fixSchemaElementName ($ sequenceName ),
492
490
'allocationSize ' => 1 ,
493
491
'initialValue ' => 1 ,
You can’t perform that action at this time.
0 commit comments