View Issue Details

IDProjectCategoryView StatusLast Update
0000148DefKeyGeneralpublic2023-07-06 20:52
Reporterzeynel Assigned Tozeynel  
PrioritylowSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Target Version4.0 
Summary0000148: Use inheritance for comment tables
Description

TPT (table per type) inheritance can be used in Entity Framework Model First to reduce repetive code & database fields.

Other strategies said to be not supported when generating database from designer model.

https://stackoverflow.com/questions/4514973/entity-framework-model-first-inheritance

My strategy would be;

  • Creating new comment tables, do not touch existing ones at all,
  • Copy comment data to new tables,
  • Edit controlllers (and remove redundant ones) to use new tables.
  • Remove old comment tables after some time.

While at this, instead of using comment ID on #comment-25252, a page level ID can be used. such as #comment5. This would look cleaner. This probably also should be kept in database field (such as commentNumber), because when I delete comments, "4th comment in Notepad" won't make much sense.

Additional Information
  • When implemented, comment IDs will be re-created. What to do with commentIsReplyToId? I should keep comment nesting. I could programmatically import comments to new tables, assigning them a new commentIsReplyTo Id based on new Id.
  • When implemented, older hyperlinks pointing to comments will not scroll to comments anymore. No easy fix for that, but probably it won't be a big problem.
TagsNo tags attached.

Relationships

related to 0000129 resolvedzeynel Replying to sub-comments 
parent of 0000164 resolvedzeynel Comment support for additional pages 

Activities

zeynel

2022-10-24 22:13

administrator   ~0002651

Partially resolved as I implemented another way to deal with this. Comments now use same model (interface) and view, and continue to use current tables.

Issue History

Date Modified Username Field Change
2021-02-02 11:15 zeynel New Issue
2021-02-02 12:40 zeynel Additional Information Updated
2021-02-02 12:47 zeynel Description Updated
2021-02-02 12:47 zeynel Additional Information Updated
2021-02-02 12:48 zeynel Relationship added related to 0000129
2021-02-02 12:51 zeynel Description Updated
2021-02-04 17:42 zeynel Description Updated
2021-03-02 14:57 zeynel Relationship added parent of 0000164
2022-10-24 22:11 zeynel Assigned To => zeynel
2022-10-24 22:11 zeynel Status new => acknowledged
2022-10-24 22:13 zeynel Status acknowledged => assigned
2022-10-24 22:13 zeynel Note Added: 0002651
2023-07-06 20:52 zeynel Status assigned => resolved
2023-07-06 20:52 zeynel Resolution open => fixed