d2 icon indicating copy to clipboard operation
d2 copied to clipboard

In shape sql_shape foreign key reference hover effect is not working

Open YashBhalodi opened this issue 3 years ago • 1 comments

So the doc claims that if I make a connect between two sql_shape keys, hovering over either of them should highlight the respective connected key in the referenced table shape. (reference)

If you hover over the primary key or foreign key with your cursor, you'll notice that the corresponding key is highlighted.

I tried it out with the following D2 Script. but it doesn't seem to be working.

Am I missing something here?

a: tableA {
    shape: "sql_table"
    id: int {constraint: primary_key}
    columnA: string
    columnB: jsonB
}

b: tableB {
    shape: "sql_table"
    id: int {constraint:primary_key}
    columnD: string
    columnE: timestamp
}

mab: map_tableA_tableB {
    shape: "sql_table"
    id: int {constraint: primary_key}
    fk_tableA_id: int {constraint: foreign_key}
    fk_tableB_id: int {constraint: foreign_key}
}

mab.fk_tableA_id -> a.id
mab.fk_tableB_id -> b.id

If it is relevant here, my d2 version is v0.0.13.

YashBhalodi avatar Nov 26 '22 14:11 YashBhalodi

Same for me 👍

npupko avatar Dec 16 '22 11:12 npupko

closing in favor of https://github.com/terrastruct/d2/issues/795

alixander avatar Mar 11 '23 18:03 alixander