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 

enter image description here

how different fields in project/client/task?


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -