gorm
gorm copied to clipboard
Multiple foreign keys saving problem
GORM Playground Link
https://github.com/go-gorm/playground/pull/513
Description
The case of using several foreign keys to different tables which on higher table connects to single parent table could cause problems on save (using Create from parent entity). It looks like one of the relations is ignored or shadowed by the other. A problem exists when populating both foreign keys. When populate only one of the keys works correctly. For exact data structure and test case see related PR.