GORM Playground can be used to play GORM and reports issues, if you encounter a bug in GORM, please report it at https://github.com/go-gorm/gorm/issues with the Playground Pull Request's link
# install docker-compose https://docs.docker.com/compose/install/
# setup test databases
docker-compose up
./test.sh
# Run tests with cached GORM and latest drivers
GORM_ENABLE_CACHE=true ./test.sh
# Run tests with specfied database
GORM_DIALECT=mysql go test
6. Create Playground Pull Request and Create a GORM issue with the link
We are using the following configuration run your code (GORM's latest master branch, latest database drivers: sqlite, mysql, postgres, sqlserver), you could change the configuration in file main_test.go
// GORM_REPO: https://github.com/go-gorm/gorm.git
// GORM_BRANCH: master
// TEST_DRIVERS: sqlite, mysql, postgres, sqlserver
We have prepared some structs with relationships in https://github.com/go-gorm/playground/blob/master/models.go that you can use for your tests