I have the following requirement:
User Table
UserIDint (PK)UserNamestring
Configuration Table
ConfigIDint (PK)ConfigNamestringDefaultConfigValuestring
UserConfig
UserIDint (PK)ConfigIDint (PK)ConfigValuestring
How can I define my NHibernate mapping to load all of the configuration with the user value if configured?
Eg.
ConfigID | DefaultValue
----------+-------------
1 | 100
2 | Test
UserID | ConfigID |Value
--------+------------+-----
1 | 1 |200
If User 1 logs in then my config table should have the value:
ConfigId | Value
---------+------
1 | 200
2 | Test