I am using nhibernate but I seem to be making my life harder and harder as I plan my design.
I have a bunch of domain objects which are linked together in an entirely normal way. For the purposes of example, these could be Authors, Books and Publishers. However I would like to extend this so that these items can have other attributes linked to them, e.g. Notes. An individual Book could have multiple notes, as could an Author or Publisher. The same sort of system could work for categories, tags[1] or a bunch of other attributes. Is there a sensible way of designing a domain model (and database structure) around this without having a mapping table for each? I have not seen any examples where one domain model (e.g. Notes) has multiple lists of other objects that could relate to it. I have only seen the following, which could get complicated pretty quickly and introduces a whole unnecessary layer of complexity: Author <-> AuthorNotes <-> Notes Book <-> BookNotes <-> Notes Publisher <-> PublisherNotes <-> Notes It would be great to hear about alternative ways of defining these sorts of relationships. 1 - I know there are alternative methods of implementing this and will be considering them. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
