Skip to content

Commit 222bb07

Browse files
committed
When populating hydrate column map, exclude reserved columns. #536
1 parent d449446 commit 222bb07

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

plugin/query_data.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,11 @@ func (d *QueryData) populateRequiredHydrateCalls() {
289289

290290
// populate a map keyed by function name to ensure we only store each hydrate function once
291291
for _, column := range t.Columns {
292+
// skip reserved columns
293+
if _, isReserved := d.reservedColumns[column.Name]; isReserved {
294+
continue
295+
}
296+
292297
// see if this column specifies a hydrate function
293298

294299
var hydrateName string
@@ -332,10 +337,6 @@ func (d *QueryData) populateColumns() {
332337
// get the column returned by the given hydrate call
333338
func (d *QueryData) addColumnsForHydrate(hydrateName string) {
334339
for _, columnName := range d.hydrateColumnMap[hydrateName] {
335-
// skip reserved columns
336-
if _, isReserved := d.reservedColumns[columnName]; isReserved {
337-
continue
338-
}
339340

340341
// get the column from the table
341342
column := d.Table.getColumn(columnName)

0 commit comments

Comments
 (0)