Blackdread / sql-to-jdl

Tool to translate SQL databases to JDL format of jHipster (Created due to existing databases to be generated with jHipster and build angular-java web)
MIT License
179 stars 81 forks source link

Add support for best guess for relationship display fields #140

Closed octgsoftware closed 1 year ago

octgsoftware commented 1 year ago

Displaying the id for select boxes and in columns is currently the Jhipster default behavior.

The majority of my entities have a unique constraint on a single column. Picking a column with the lowest ordinal position and a unique constraint as the display field would take care of the vast majority of my cases.

See JDL Relationship Syntax for how to specify the display field on relationships.

Blackdread commented 1 year ago

Makes sense to implement a logic to select the display field

octgsoftware commented 1 year ago

Fixed by https://github.com/Blackdread/sql-to-jdl/pull/143