[PR #7504] [MERGED] fix(db): only exclude returned: false fields from output schemas #24260

Closed
opened 2026-04-15 22:16:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7504
Author: @Paola3stefania
Created: 1/20/2026
Status: Merged
Merged: 1/20/2026
Merged by: @himself65

Base: canaryHead: fix/returned-false-input-validation-clean


📝 Commits (3)

  • d3720b0 fix(db): only exclude returned:false fields from output schemas
  • 4bff47d add tests
  • b286da6 Merge branch 'canary' into fix/returned-false-input-validation-clean

📊 Changes

2 files changed (+33 additions, -1 deletions)

View changed files

packages/better-auth/src/db/to-zod.test.ts (+32 -0)
📝 packages/better-auth/src/db/to-zod.ts (+1 -1)

📄 Description

https://github.com/better-auth/better-auth/issues/7489 fix


Summary by cubic

Exclude fields marked returned:false only from output schemas (isClientSide: false). Input schemas now keep these fields, so they can be validated and saved when creating/updating records.

Written for commit b286da60db. Summary will update 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/7504 **Author:** [@Paola3stefania](https://github.com/Paola3stefania) **Created:** 1/20/2026 **Status:** ✅ Merged **Merged:** 1/20/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/returned-false-input-validation-clean` --- ### 📝 Commits (3) - [`d3720b0`](https://github.com/better-auth/better-auth/commit/d3720b050e72f124f1869ae3fa7599d309fbd13c) fix(db): only exclude returned:false fields from output schemas - [`4bff47d`](https://github.com/better-auth/better-auth/commit/4bff47dc9e916edd9842befd2196ca300f94bb43) add tests - [`b286da6`](https://github.com/better-auth/better-auth/commit/b286da60db49695a251d9afa98148ce764f353cf) Merge branch 'canary' into fix/returned-false-input-validation-clean ### 📊 Changes **2 files changed** (+33 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `packages/better-auth/src/db/to-zod.test.ts` (+32 -0) 📝 `packages/better-auth/src/db/to-zod.ts` (+1 -1) </details> ### 📄 Description https://github.com/better-auth/better-auth/issues/7489 fix <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Exclude fields marked returned:false only from output schemas (isClientSide: false). Input schemas now keep these fields, so they can be validated and saved when creating/updating records. <sup>Written for commit b286da60db49695a251d9afa98148ce764f353cf. Summary will update 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-04-15 22:16:02 -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#24260