Skip to content

fix: Protect id field from being overwritten or redefined (#55)#72

Merged
hakancelikdev merged 1 commit into
mainfrom
fix/id-field-protection
Feb 19, 2026
Merged

fix: Protect id field from being overwritten or redefined (#55)#72
hakancelikdev merged 1 commit into
mainfrom
fix/id-field-protection

Conversation

@hakancelikdev

Copy link
Copy Markdown
Owner

The id field is auto-generated and should be read-only. Previously it could be silently overwritten via constructor args or direct assignment, and its type could be redefined in model annotations. Now raises ReadOnlyFieldError in all three cases.

The id field is auto-generated and should be read-only. Previously it could
be silently overwritten via constructor args or direct assignment, and its
type could be redefined in model annotations. Now raises ReadOnlyFieldError
in all three cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hakancelikdev hakancelikdev merged commit 7896925 into main Feb 19, 2026
14 checks passed
@hakancelikdev hakancelikdev deleted the fix/id-field-protection branch February 19, 2026 03:52
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