Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions queries/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const (
loadMethodPrefix = "Load"
relationshipStructName = "R"
loaderStructName = "L"
sentinel = uint64(255)
sentinel = uint64(511)
)

// BindP executes the query and inserts the
Expand Down Expand Up @@ -330,8 +330,8 @@ func ptrFromMapping(val reflect.Value, mapping uint64, addressOf bool) reflect.V
var ignored interface{}
return reflect.ValueOf(&ignored)
}
for i := 0; i < 8; i++ {
v := (mapping >> uint(i*8)) & sentinel
for i := 0; i < 9; i++ {
v := (mapping >> uint(i*9)) & sentinel

if v == sentinel {
if addressOf && val.Kind() != reflect.Ptr {
Expand Down Expand Up @@ -380,11 +380,11 @@ func makeStructMappingHelper(typ reflect.Type, prefix string, current uint64, de
}

if recurse {
makeStructMappingHelper(f.Type, tag, current|uint64(i)<<depth, depth+8, fieldMaps)
makeStructMappingHelper(f.Type, tag, current|uint64(i)<<depth, depth+9, fieldMaps)
continue
}

fieldMaps[tag] = current | (sentinel << (depth + 8)) | (uint64(i) << depth)
fieldMaps[tag] = current | (sentinel << (depth + 9)) | (uint64(i) << depth)
}
}

Expand Down