Closed asitemade4u closed 3 years ago
@asitemade4u I tried it with the current master branch at commit at commit c43fae77b770c653959dd2a0b3611dc89eddb19a , but couldn't reproduce it. Could you give me a full procedure?
# Run postgresql v12
docker run --rm -d -p 35432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:12-alpine
# connect
psql -U postgres -h localhost -p 35432 -d postgres
# create kuq schema
CREATE SCHEMA kuq;
# create tables
CREATE TABLE kuq.tag (
tag_key int4 NOT NULL,
ctg_key int4 NULL,
tag varchar(60) NULL,
CONSTRAINT tag_pk PRIMARY KEY (tag_key),
CONSTRAINT tag_un UNIQUE (tag_key)
);
CREATE INDEX tag_tag_idx ON kuq.tag USING btree (tag);
CREATE TABLE kuq.ctg (
ctg_key int4 NOT NULL,
CONSTRAINT ctg_pk PRIMARY KEY (ctg_key)
);
ALTER TABLE kuq.tag ADD CONSTRAINT tag_fk FOREIGN KEY (ctg_key) REFERENCES kuq.ctg(ctg_key);
planter 'postgres://postgres@localhost:35432/postgres?sslmode=disable' -s kuq -t 'tag' -t 'ctg' -o test.html
@startuml
hide circle
skinparam linetype ortho
entity "ctg" {
+ ctg_key:integer [PK]
--
}
entity "tag" {
+ tag_key:integer [PK]
--
ctg_key:integer [FK]
tag:character varying(60)
}
tag }-- ctg
@enduml
It seems like it's not happening in current version, so I'll close this issue. Thanks!
Hi, Thank you so very much for this very useful program!
Everything works well with one exception: all relations are duplicated and I cannot figure why. Here is a simple example from a much larger PostgreSQL database:
TAG
, with a PKtag_key
CTG
(= categories), with a PKctg_key
tag_fk
: each tag belongs or not to a categorykuq
Here is the TAG DDL for
TAG
:When I execute:
I get this PlantUML schema where the many to one link between
TAG
andCTG
is duplicated:And, in effect, the link is duplicated in the UML definition file:
What am I doing wrong? Best, Stephen