Skip to content

Conversation

@eluce2
Copy link
Collaborator

@eluce2 eluce2 commented Feb 10, 2026

Date/time/timestamp values are now emitted unquoted in OData $filter.
Database.from() no longer mutates shared _useEntityIds state.


Note

Medium Risk
Touches query/filter string generation and entity-id routing behavior, which can subtly change request URLs/filters across consumers; changes are covered by new unit tests but could affect existing integrations relying on prior quoting/mutation behavior.

Overview
Fixes OData $filter serialization so date/time/timestamp operands are emitted without single quotes by propagating a fieldType onto Column and using it in FilterExpression._operandToString.

Fixes a state-leak bug where Database.from() could mutate shared _useEntityIds; it now resolves useEntityIds per call and passes it into EntitySet explicitly.

Updates CI (continuous-release.yml) to add a dedicated build job and makes publish depend on lint, typecheck, test, and build, plus adds/updates tests covering unquoted date/timestamp filters.

Written by Cursor Bugbot for commit 88aa52b. This will update automatically on new commits. Configure here.

… mutation bug

Date/time/timestamp values are now emitted unquoted in OData $filter.
Database.from() no longer mutates shared _useEntityIds state.
@vercel
Copy link

vercel bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
proofkit-docs Ready Ready Preview Feb 10, 2026 6:27pm

Request Review

Copy link
Collaborator Author

eluce2 commented Feb 10, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@eluce2 eluce2 marked this pull request as ready for review February 10, 2026 18:15
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 10, 2026

Open in StackBlitz

@proofkit/better-auth

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/better-auth@116

@proofkit/cli

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/cli@116

create-proofkit

pnpm add https://pkg.pr.new/proofgeist/proofkit/create-proofkit@116

@proofkit/fmdapi

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/fmdapi@116

@proofkit/fmodata

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/fmodata@116

@proofkit/typegen

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/typegen@116

@proofkit/webviewer

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/webviewer@116

commit: 88aa52b

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@eluce2 eluce2 merged commit 840c7c1 into main Feb 10, 2026
16 checks passed
@eluce2 eluce2 deleted the 02-10-fix_fmodata_unquoted_date_values_in_odata_filters_database.from_mutation_bug branch February 10, 2026 18:32
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

// Get useEntityIds from database if available, otherwise default to false
this.databaseUseEntityIds = config.database?._getUseEntityIds ?? false;
// Use explicit useEntityIds if provided, otherwise fall back to database setting
this.databaseUseEntityIds = config.useEntityIds ?? config.database?._getUseEntityIds ?? false;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Navigate loses per-table useEntityIds after mutation fix

Medium Severity

The navigate() method creates a new EntitySet without passing useEntityIds, so it always falls back to config.database?._getUseEntityIds (the original database default). Before this PR, from() mutated the shared _useEntityIds on the database, so navigate() would inherit the per-table override via the database getter. Now that the mutation is correctly removed, navigate() silently loses the resolved useEntityIds from the parent EntitySet. For example, db.from(tableWithEntityIds).navigate(otherTable) will revert to the database default instead of preserving the entity ID setting, potentially causing queries to use field names instead of entity IDs.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant