Skip to content

Conversation

@Artmann
Copy link
Owner

@Artmann Artmann commented Dec 25, 2025

Add compile-time type checking for where, whereIn, whereNotIn, and orderBy methods to ensure only valid model field names are accepted.

This prevents runtime errors from typos in field names by catching them at compile time. For example, MenuItem.where('active', true) will now produce a TypeScript error if the field is actually named available.

Closes #60

Add compile-time type checking for `where`, `whereIn`, `whereNotIn`, and
`orderBy` methods to ensure only valid model field names are accepted.

This prevents runtime errors from typos in field names by catching them
at compile time. For example, `MenuItem.where('active', true)` will now
produce a TypeScript error if the field is actually named 'available'.

Closes #60
@vercel
Copy link

vercel bot commented Dec 25, 2025

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

Project Deployment Review Updated (UTC)
esix Error Error Dec 25, 2025 0:03am

@Artmann Artmann merged commit f641b7f into main Dec 25, 2025
10 of 11 checks passed
@Artmann Artmann deleted the claude/fix-issue-60-tdd-OBymF branch December 25, 2025 00:04
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.

Only allow model fields as key for filters

3 participants