Private Issues: Examine feasibility of single type/class ⇔ multiple DB tables #244
Labels
No labels
Backlog Status
Needs Review
Backlog Status
Ready
Chore
points
01
points
02
points
03
points
05
points
08
points
13
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#113 Private Issues
forge/forge
Reference
forge/forge#244
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
In the design ticket (forgejo/design#2), there are comments mentioning using one class/type in the code as an option. I want to research if it is possible to have instances of an xorm-backed struct type be mapped to rows in one or the other table (that’s a requirement for the feature to be accepted upstream). I assume if it were, this would let me get by with a lot less of making existing code generic to cope with two separate issue types.
Here’s my current POC: https://codeberg.org/nilsph/poc-xorm_map_type_two_tables
I’ve simplified the POC a bit and clarified about the role of
PrivateThing.I think the POC shows that:
Thing) which depending on an attribute (Thing.is_private) gets stored in one or the other table in the database (viaThing.Table()).Thingwill give you only public items and you need to usePrivateThingfor querying private items (which are cast afterwards), you shouldn’t inadvertently end up with a private item and divulge it to the wrong audience.