gnormal / gnorm

A database-first code generator for any language
https://gnorm.org
Other
487 stars 40 forks source link

ForeignKeyRefs being overwritten #123

Closed Etomyutikos closed 4 years ago

Etomyutikos commented 4 years ago

Sometimes ForeignKeyRefs are being overwritten, or attributed to the wrong table, or other strange behavior. I have identified the cause and a fix is incoming.

https://github.com/gnormal/gnorm/blob/ba7b88881fd01feb3537c577fcf318704119fd6d/run/convert.go#L240

The above should be appending to refTable.ForeignKeyRefs, not table.ForeignKeyRefs.