Remove pointers to L, not needed
This commit is contained in:
parent
fd07a1a6a7
commit
530aec1e16
1 changed files with 7 additions and 7 deletions
|
@ -288,7 +288,7 @@ type testLStruct struct {
|
||||||
type testNestedStruct struct {
|
type testNestedStruct struct {
|
||||||
ID int
|
ID int
|
||||||
R *testNestedRStruct
|
R *testNestedRStruct
|
||||||
L *testNestedLStruct
|
L testNestedLStruct
|
||||||
}
|
}
|
||||||
type testNestedRStruct struct {
|
type testNestedRStruct struct {
|
||||||
ToEagerLoad *testNestedStruct
|
ToEagerLoad *testNestedStruct
|
||||||
|
@ -299,7 +299,7 @@ type testNestedLStruct struct {
|
||||||
type testNestedSlice struct {
|
type testNestedSlice struct {
|
||||||
ID int
|
ID int
|
||||||
R *testNestedRSlice
|
R *testNestedRSlice
|
||||||
L *testNestedLSlice
|
L testNestedLSlice
|
||||||
}
|
}
|
||||||
type testNestedRSlice struct {
|
type testNestedRSlice struct {
|
||||||
ToEagerLoad []*testNestedSlice
|
ToEagerLoad []*testNestedSlice
|
||||||
|
@ -307,12 +307,12 @@ type testNestedRSlice struct {
|
||||||
type testNestedLSlice struct {
|
type testNestedLSlice struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *testLStruct) LoadTestOne(exec Executor, singular bool, obj interface{}) error {
|
func (testLStruct) LoadTestOne(exec Executor, singular bool, obj interface{}) error {
|
||||||
loadFunctionCalled = true
|
loadFunctionCalled = true
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *testNestedLStruct) LoadToEagerLoad(exec Executor, singular bool, obj interface{}) error {
|
func (testNestedLStruct) LoadToEagerLoad(exec Executor, singular bool, obj interface{}) error {
|
||||||
switch x := obj.(type) {
|
switch x := obj.(type) {
|
||||||
case *testNestedStruct:
|
case *testNestedStruct:
|
||||||
x.R = &testNestedRStruct{
|
x.R = &testNestedRStruct{
|
||||||
|
@ -329,7 +329,7 @@ func (r *testNestedLStruct) LoadToEagerLoad(exec Executor, singular bool, obj in
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *testNestedLSlice) LoadToEagerLoad(exec Executor, singular bool, obj interface{}) error {
|
func (testNestedLSlice) LoadToEagerLoad(exec Executor, singular bool, obj interface{}) error {
|
||||||
|
|
||||||
switch x := obj.(type) {
|
switch x := obj.(type) {
|
||||||
case *testNestedSlice:
|
case *testNestedSlice:
|
||||||
|
@ -354,7 +354,7 @@ func TestLoadRelationshipsSlice(t *testing.T) {
|
||||||
testSlice := []*struct {
|
testSlice := []*struct {
|
||||||
ID int
|
ID int
|
||||||
R *testRStruct
|
R *testRStruct
|
||||||
L *testLStruct
|
L testLStruct
|
||||||
}{}
|
}{}
|
||||||
|
|
||||||
if err := loadRelationships(nil, []string{"TestOne"}, &testSlice, false); err != nil {
|
if err := loadRelationships(nil, []string{"TestOne"}, &testSlice, false); err != nil {
|
||||||
|
@ -373,7 +373,7 @@ func TestLoadRelationshipsSingular(t *testing.T) {
|
||||||
testSingular := struct {
|
testSingular := struct {
|
||||||
ID int
|
ID int
|
||||||
R *testRStruct
|
R *testRStruct
|
||||||
L *testLStruct
|
L testLStruct
|
||||||
}{}
|
}{}
|
||||||
|
|
||||||
if err := loadRelationships(nil, []string{"TestOne"}, &testSingular, true); err != nil {
|
if err := loadRelationships(nil, []string{"TestOne"}, &testSingular, true); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue