[PR #6914] [MERGED] fix(adapter): apply customTransformInput to where clause values #6963

Closed
opened 2026-03-13 13:19:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6914
Author: @erquhart
Created: 12/20/2025
Status: Merged
Merged: 12/22/2025
Merged by: @Bekacru

Base: canaryHead: fix/transform-where-clause-values


📝 Commits (4)

  • 759dcc2 fix(adapter): apply customTransformInput to where clause values
  • bf93f24 fix: mongo failure
  • c5e994b Merge branch 'canary' into fix/transform-where-clause-values
  • 76ff42b Merge branch 'canary' into fix/transform-where-clause-values

📊 Changes

4 files changed (+50 additions, -2 deletions)

View changed files

📝 packages/better-auth/src/adapters/mongodb-adapter/mongodb-adapter.ts (+1 -1)
📝 packages/core/src/db/adapter/factory.ts (+30 -0)
📝 packages/core/src/db/adapter/index.ts (+9 -1)
📝 packages/core/src/db/adapter/types.ts (+10 -0)

📄 Description

Fixes #6912


Summary by cubic

Apply customTransformInput to where clause values so query filters are correctly transformed across all actions. Expand action types and adjust Mongo adapter logic to avoid failures on non-create operations.

  • Bug Fixes
    • Where values now pass through customTransformInput for findOne, findMany, update, updateMany, delete, deleteMany, and count.
    • Expanded action union in DBAdapterFactoryConfig and updated MongoDB adapter to only run create-specific logic on create.

Written for commit 76ff42b917. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/6914 **Author:** [@erquhart](https://github.com/erquhart) **Created:** 12/20/2025 **Status:** ✅ Merged **Merged:** 12/22/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/transform-where-clause-values` --- ### 📝 Commits (4) - [`759dcc2`](https://github.com/better-auth/better-auth/commit/759dcc28fe626a72621a16a90d6f0b326195a41b) fix(adapter): apply customTransformInput to where clause values - [`bf93f24`](https://github.com/better-auth/better-auth/commit/bf93f24ade66171cbfed7dce433fada37a891a5e) fix: mongo failure - [`c5e994b`](https://github.com/better-auth/better-auth/commit/c5e994b593fac33d83e2e71f6b3ef6e33ca6f22b) Merge branch 'canary' into fix/transform-where-clause-values - [`76ff42b`](https://github.com/better-auth/better-auth/commit/76ff42b917f2a7d2458634706c5460bd5b4b52ad) Merge branch 'canary' into fix/transform-where-clause-values ### 📊 Changes **4 files changed** (+50 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/adapters/mongodb-adapter/mongodb-adapter.ts` (+1 -1) 📝 `packages/core/src/db/adapter/factory.ts` (+30 -0) 📝 `packages/core/src/db/adapter/index.ts` (+9 -1) 📝 `packages/core/src/db/adapter/types.ts` (+10 -0) </details> ### 📄 Description Fixes #6912 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Apply customTransformInput to where clause values so query filters are correctly transformed across all actions. Expand action types and adjust Mongo adapter logic to avoid failures on non-create operations. - **Bug Fixes** - Where values now pass through customTransformInput for findOne, findMany, update, updateMany, delete, deleteMany, and count. - Expanded action union in DBAdapterFactoryConfig and updated MongoDB adapter to only run create-specific logic on create. <sup>Written for commit 76ff42b917f2a7d2458634706c5460bd5b4b52ad. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:19:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#6963