fix: soft-delete via direct UPDATE + non-generator get_first #6
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
CobraPack/repository!6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hotfix/delete-entity-commit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two fixes for the soft-delete flow (delete_entity):
get_first: replaced async-generator-based implementation with
a direct session query. The generator-based approach kept the
session open after returning the first result, causing connection
leaks that blocked subsequent writes (especially on SQLite).
soft_delete: new repo method that issues a direct
UPDATE … SET remove=truewith explicit commit, avoiding theORM merge path on detached entities entirely.
delete_entity: now calls
repo.soft_delete(entity_id)insteadof fetching, mutating a detached entity, and calling
repo.update().Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com