Fluent NHibernate maps merged subclass without source class file

I have a library with a Recipient class that has its own smooth display setting in the library.

Now in another project I created a new SentEmail class that inherits from Recipient, I want to be able to create a new mapping class file based on the original recipient card. If I could update the original ClassMap file I would use

SubClass ("ID", m => MAPPING HERE);

However, since I cannot customize the original classmap, I am stuck on how I can do this.

There must be another way to fool this cat if anyone has ideas that they really like.

thanks

UPDATE

I also forgot to mention some of the details in the new SentEmail model class, which are stored in a separate table in the recipient table.

0


a source to share


1 answer


If you can't customize the original mapping at all, then you're out of luck; otherwise, you could use the method AddPart

to add a separate instance JoinedSubClassPart

.



As an aside: your design sounds a little odd. SentEmail

it doesn't seem like it really should inherit from Recipient

. SentEmail

inherits from Email

or SuccessfulRecipient

from Recipient

; Recipient

and Email

are two separate concepts.

+1


a source







All Articles