| 149 | | $fk = $col->getForeignKey(); |
|---|
| 150 | | if ( $fk == null ) continue; |
|---|
| 151 | | $dotSyntax .= 'node'.$tbl->getName() .':cols -> node'.$fk->getForeignTableName() . ':table [label="' . $col->getName() . '=' . implode(',', $fk->getForeignColumns()) . ' "];'; |
|---|
| 152 | | $dotSyntax .= "\n"; |
|---|
| | 149 | $fk = $col->getForeignKeys(); |
|---|
| | 150 | if ( count($fk) == 0 or $fk === null ) continue; |
|---|
| | 151 | if ( count($fk) > 1 ) throw( new Exception("not sure what to do here...") ); |
|---|
| | 152 | $fk = $fk[0]; // try first one |
|---|
| | 153 | $dotSyntax .= 'node'.$tbl->getName() .':cols -> node'.$fk->getForeignTableName() . ':table [label="' . $col->getName() . '=' . implode(',', $fk->getForeignColumns()) . ' "];'; |
|---|
| | 154 | $dotSyntax .= "\n"; |
|---|