MSSQL support for multiple foreign keys (composite keys).

GORM Syntax for multiple foreign keys generates a SQL Statement, but the query statement generated doesn't work for MSSQL 2017 (probably in all other MSSQL version also)

GORM is really a powerful ORM, and I believe many more would adopt this if it will also have full support for MSSQL.

Related Issues

(https://github.com/go-gorm/gorm/issues/5965)

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: RasmusN

I'm having the same issue with the following version

SELECT @@VERSION
Microsoft SQL Azure (RTM) - 12.0.2000.8     Apr  3 2024 14:04:26    Copyright (C) 2022 Microsoft Corporation 

Error message

mssql: An expression of non-boolean type specified in a context where a condition is expected, near ','.
[40.122ms] [rows:0] SELECT * FROM "sources" WHERE ("sources"."name","sources"."endpoint") IN (('mySource','sample/data'))

``golang type Source struct { Name stringgorm:"primaryKey;type:nvarchar(256)"Endpoint stringgorm:"primaryKey;type:nvarchar(256)"` }