architecture - How to design discussion for multiple entities -
i've got entities project, client, task, , every 1 of them should have list of posts(aka discussion). problem since every entity(project, client,..) mapped it's own table, can't refer entity discussion "owner_id" because it'd ambigious having client id=1 , project id=1 , discussion wouldn't know if belongs project or client. i'd avoid having independent discussion entity client , independend discussion entity project .. (cause later on might want add discussion entity it's not "scalable"). know can add discriminator attribute(column) discussion distinguish between clientdiscussion , projectdiscussion. i'm wondering if that's right way such thing or not. tink?
personally sounds need create abstract entity.
entitytype<-entity<-entitydiscussion->discussion
how different fields in project/client/task?
Comments
Post a Comment