I'm creating a project tasklist application. I have project, section, task, issue classes, and would like to use one class to be able to add simple notes to any object instance of those classes.
The task, issue tables both use a standard identity field as a primary key. The section table has a two field primary key. The project table has a single int primary key defined by the user.
Is there a way to associate the note class with each of these without using a separate look-up table for each class?
I'm not so sure my original idea is a decent way to implement this. I considered the following (each variable mapping to a field n the notes table.
Private _NoteId As Integer
Private _ProjectId As Integer
Private _SectionId As Integer
Private _SectionId2 As Integer
Private _TaskId As Integer
Private _IssueId As Integer
Private _Note As String
Private _UserId As Guid
Then I would be able to write separate methods (getProjectNotes, getTaskNotes) to get notes attached to each class.
I started writing this a few weeks ago but got pulled away before I could finish. When revisiting this code today my first thought "this is retarded". Thoughts on drawbacks to this design?