style: empty QueryClauses in association (#5502)
This commit is contained in:
parent
cbecf7b5e7
commit
1ebe2501f2
@ -1,9 +1,10 @@
|
|||||||
package tests_test
|
package tests_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
"gorm.io/gorm/clause"
|
"gorm.io/gorm/clause"
|
||||||
"gorm.io/gorm/schema"
|
"gorm.io/gorm/schema"
|
||||||
"testing"
|
|
||||||
|
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
. "gorm.io/gorm/utils/tests"
|
. "gorm.io/gorm/utils/tests"
|
||||||
@ -309,11 +310,10 @@ func (sd emptyQueryClause) MergeClause(*clause.Clause) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (sd emptyQueryClause) ModifyStatement(stmt *gorm.Statement) {
|
func (sd emptyQueryClause) ModifyStatement(stmt *gorm.Statement) {
|
||||||
//do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAssociationEmptyQueryClause(t *testing.T) {
|
func TestAssociationEmptyQueryClause(t *testing.T) {
|
||||||
|
|
||||||
type Organization struct {
|
type Organization struct {
|
||||||
gorm.Model
|
gorm.Model
|
||||||
Name string
|
Name string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user