Suppose I have 2 tables in a database. eg: Dog & Boss This is a many to many relationship, cause a boss can have more than 1 dog, and a dog can have more than 1 owner. I am the owner of Bobby, but so is my wife.
But many to many is not allowed, so there is a helpertable: DogsPerBoss
How to modle this in code?
Class Boss can have a collection of Dogs. Class Dogcan have a collection of Bosses. --> at least, that is what I think. Perhaps there are better solutions?
How about extra data that is in the helper-table? Should that be in de Boss-class or in the Dog-class? eg: Nickname (I call the dog "good boy" and my wife calls him "doggie")
I hope my question is kinda clear? Are there any best-practices on what is the best way to achieve this? Can you give me some references?
An ORM (like NHibernate) is not an option.
thanx in advance.