Commit 86cdf09b authored by Benjamin Eberlei's avatar Benjamin Eberlei

DBAL-50 - Fix two bugs occuring when new index handling is mixed with ORM...

DBAL-50 - Fix two bugs occuring when new index handling is mixed with ORM (which produces an additional set of very long automatically generated identifiers) in automatic identifier name generation.
parent f8fb3b7d
......@@ -84,7 +84,12 @@ abstract class AbstractAsset
$identifier = trim(implode("_", $parts), '_');
// using implicit schema support of DB2 and Postgres there might be dots in the auto-generated
// identifier names which can easily be replaced by underscores.
$identifier = str_replace(".", "_", $identifier);
$identifier = str_replace(array(".", " "), "_", $identifier);
if (is_numeric(substr($identifier, 0, 1))) {
$identifier = "i" . substr($identifier, 0, strlen($identifier)-1);
}
return $identifier;
}
}
\ No newline at end of file
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