Thanks for the suggestion, this is what I was looking for: <hibernate-mapping> <subclass name="DomesticCat" extends="Cat" discriminator-value="D"> <property name="name" type="string"/> </subclass> </hibernate-mapping>
I'll give it a try once I get back in the office. On Saturday, January 9, 2016 at 3:57:58 AM UTC-8, Oskar Berggren wrote: > > 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 <humbert...@gmail.com <javascript:>>: > >> 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 nhusers+u...@googlegroups.com <javascript:>. >> To post to this group, send email to nhu...@googlegroups.com >> <javascript:>. >> 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 nhusers+unsubscr...@googlegroups.com. To post to this group, send email to nhusers@googlegroups.com. Visit this group at https://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.