First, define you class model (A User has many UserConfig...), then read the
NH docs.
NH is an ORM tool. You only have the "R" (relational) part there. After
defining the "O" (object) part, we can help you with the "M" (mapping) if
the docs are not clear enough.

   Diego


On Sat, Feb 13, 2010 at 17:34, ka <[email protected]> wrote:

>  Hi,
>
> I have the following requirement:
>
> User Table
> •UserID int (PK)
> •UserName string
>
> Configuration Table
> •ConfigID int (PK)
> •ConfigName string
> •DefaultConfigValue string
>
> UserConfig
> •UserID int (PK)
> •ConfigID int (PK)
> •ConfigValue string
>
> 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
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>

-- 
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.

Reply via email to