NHibernate version: 1.2.0.4000
Name and version of the database you are using: SQL Server 2000
I have a legacy SQL Server 2000 database that has some
interesting link tables used for collections. An example:
Code:
______________________
| Documents |
|______________________|
| DocId(int) * |
| TagCollectionId(int) |
|______________________|
_______________________
| TagCollection |
|_______________________|
| TagCollectionId* (int)|
| Order*(int) |
| ItemId*(int) |
|_______________________|
_________________________
| Tags |
|_________________________|
| ItemId*(int) |
| Description(varchar(25) |
|_________________________|
The problem I'm having is how to map the TagCollection and Tag tables with the Documents table. I'd like to have a Document class with a Tags property, but I'm not sure if that's feasible or if I need a TagCollection class as well (I'm thinking yes because of the Order column, but I'm not sure). Further complicating things (at least for me) is the fact that the TagCollection table does not contain a DocId column, but instead the TagCollectionId from the Documents table.
Any advice on how to proceed with this type of mapping is appreciated.
Thanks,
Sean Carpenter