mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 15:33:57 +00:00
SYNC: fixed references error
This commit is contained in:
committed by
Diflow
parent
840e3b861f
commit
af69352361
@@ -131,8 +131,8 @@ export class TableGridDisplay extends GridDisplay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addReferenceToSelect(select: Select, parentAlias: string, column: DisplayColumn) {
|
addReferenceToSelect(select: Select, parentAlias: string, column: DisplayColumn) {
|
||||||
if ((select.from.relations || []).find(x => x.alias == childAlias)) return;
|
|
||||||
const childAlias = shortenIdentifier(`${column.uniqueName}_ref`, this.driver?.dialect?.maxIdentifierLength);
|
const childAlias = shortenIdentifier(`${column.uniqueName}_ref`, this.driver?.dialect?.maxIdentifierLength);
|
||||||
|
if ((select.from.relations || []).find(x => x.alias == childAlias)) return;
|
||||||
const table = this.getFkTarget(column);
|
const table = this.getFkTarget(column);
|
||||||
if (table && table.primaryKey) {
|
if (table && table.primaryKey) {
|
||||||
select.from.relations = [
|
select.from.relations = [
|
||||||
|
|||||||
Reference in New Issue
Block a user