mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2025-12-31 17:28:58 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05962035b6 |
@@ -260,9 +260,12 @@ func (h *Handler) handleRead(ctx context.Context, w common.ResponseWriter, id st
|
|||||||
query = query.Table(tableName)
|
query = query.Table(tableName)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: X-Files configuration is now applied via parseXFiles which populates
|
// If we have computed columns/expressions but options.Columns is empty,
|
||||||
// ExtendedRequestOptions fields (columns, filters, sort, preload, etc.)
|
// populate it with all model columns first since computed columns are additions
|
||||||
// These are applied below in the normal query building process
|
if len(options.Columns) == 0 && (len(options.ComputedQL) > 0 || len(options.ComputedColumns) > 0) {
|
||||||
|
logger.Debug("Populating options.Columns with all model columns since computed columns are additions")
|
||||||
|
options.Columns = reflection.GetModelColumns(model)
|
||||||
|
}
|
||||||
|
|
||||||
// Apply ComputedQL fields if any
|
// Apply ComputedQL fields if any
|
||||||
if len(options.ComputedQL) > 0 {
|
if len(options.ComputedQL) > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user