Hi,

Have you looked into the inheritance mapping documentation here:
http://nhibernate.info/doc/nhibernate-reference/inheritance.html

Though I suspect it might be difficult without cooperation from the base
class.

I've never used rhino-security, but I think I better approach would be to
exploit the benefits of open-source: fork the project on
https://github.com/ayende/rhino-security and add the property directly to
the base class. You could even try submitting the change as a pull request.

Alternatively create a class UserGroupDescription { UserGroup group; string
Description } to keep the descriptions in a separate table.

/Oskar

2016-01-09 3:01 GMT+00:00 beto <[email protected]>:

> Hi
>
> Thanks for the help in advanced.
>
> I'm currently using rhino-security
> <https://github.com/ayende/rhino-security> (uses nhibernate to map the
> tables) and would like to add a column to the entity class "UserGroup" I
> know I would have to inherit from the UserGroup class:
>
> public class ModUserGroup:UserGroup{
>           public virtual string Description {get; set;}
> }
>
> but how would I go about mapping the new column without modifying the
> existing source code? Is this even possible with NHibernate?
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/nhusers.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to