I've tried to understand it by reading the documentation, but it is not written for the beginners, believe me!
So here is my question in the hope of finding a straight forward answer:
I have two classes: Car and Part.
Cars are stored in one table: Cars
Code:
TOYOTA
MAZDA
and Parts are stored in another table: Parts.
Code:
ENGINE
DOOR
WINDSCREEN
OILPUMP
Each entry in the table has a unique id and each car has multiple parts.
Now I have a third table to link these to. Lets call is Car_Parts
This table only has two columns: CarId and PartId. Here I link cars to their parts. For example:
Code:
TOYOTA, ENGINE
TOYOTA, DOOR
TOYOTA, WINDSCREEN
MAZDA, ENGINE
MAZDA, DOOR
MAZDA, OILPUMP
How can I use NHibernate for this structure?
Any help is very much appreciated.
Thank you