Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[DC-825] fix generation of the versionable table

  • Loading branch information...
commit 0d2da07cf90547e36f8e469190edbc94baf64a93 1 parent 55c9b6b
Enrico Stahn authored estahn committed
View
6 lib/Doctrine/Record/Generator.php
@@ -280,14 +280,14 @@ public function buildForeignKeys(Doctrine_Table $table)
{
$fk = array();
- foreach ((array) $table->getIdentifier() as $column) {
- $def = $table->getDefinitionOf($column);
+ foreach ((array) $table->getIdentifier() as $field) {
+ $def = $table->getDefinitionOf($field);
unset($def['autoincrement']);
unset($def['sequence']);
unset($def['primary']);
- $col = $column;
+ $col = $table->hasColumn($field) ? $field : $table->getColumnName($field) . ' as ' . $field;
$def['primary'] = true;
$fk[$col] = $def;
View
0  tests/DC825TestCase.php → tests/Ticket/DC825TestCase.php
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.