Permalink
Browse files

[DC-825] fix generation of the versionable table

  • Loading branch information...
1 parent 55c9b6b commit 0d2da07cf90547e36f8e469190edbc94baf64a93 Enrico Stahn committed with estahn Aug 13, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Doctrine/Record/Generator.php
  2. 0 tests/{ → Ticket}/DC825TestCase.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;
File renamed without changes.

0 comments on commit 0d2da07

Please sign in to comment.