Unverified Commit 3195492c authored by Guilherme Blanco's avatar Guilherme Blanco Committed by Sergei Morozov

Moved getSequencePrefix() from ClassMetadata (ORM) to AbstractPlatform (DBAL)

parent 76bb4637
......@@ -3060,6 +3060,26 @@ abstract class AbstractPlatform
return false;
}
/**
* Gets the sequence name prefix based on table information.
*
* @param string $tableName
* @param string|null $schemaName
*
* @return string
*/
public function getSequencePrefix($tableName, $schemaName = null)
{
if (! $schemaName) {
return $tableName;
}
// Prepend the schema name to the table name if there is one
return ! $this->supportsSchemas() && $this->canEmulateSchemas()
? $schemaName . '__' . $tableName
: $schemaName . '.' . $tableName;
}
/**
* Returns the name of the sequence for a particular identity column in a particular table.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment