GORM Playground Link

https://github.com/go-gorm/playground/pull/1

Description

This has been caught as part of static analysis tool report, version mentioned below: error - Dereference nil return value function - DB.Association details - If the function actually returns a nil value, a nil pointer dereference will occur. In github.​com/jinzhu/gorm.​DB.​Association(string, *github.​com/jinzhu/gorm.​Association): Return value of function which returns nil is dereferenced without checking (CWE-476) Gorm Coverity scan issue - Dereference nil return value

version - github.com/jinzhu/gorm v1.9.12

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking

Comment From: raghvendra-dixit

Hi @jinzhu , this is an issue which is an static analysis tool report, thought of sharing here to get insights for the issue and possible discussion to fix this. Unfortunately, in this case i do not have go playground to simulate, as this scan report of the code base

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking