mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-01-03 02:14:25 +00:00
Count Fixes
This commit is contained in:
@@ -201,9 +201,9 @@ func (h *Handler) handleRead(ctx context.Context, w common.ResponseWriter, id st
|
||||
|
||||
logger.Info("Reading records from %s.%s", schema, entity)
|
||||
|
||||
// Use Table() with the resolved table name and Model() for Bun compatibility
|
||||
// Bun requires Model() to be set for Count() and Scan() operations
|
||||
query := h.db.NewSelect().Model(modelPtr).Table(tableName)
|
||||
// Use Table() with the resolved table name
|
||||
// Model will be provided to Scan() directly to avoid table duplication in FROM clause
|
||||
query := h.db.NewSelect().Table(tableName)
|
||||
|
||||
// Apply column selection
|
||||
if len(options.Columns) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user