Could one not get around this by mapping the abstract type
(CreditCardCompany) and exposing a save method in some DAO/Facade, which
accepts a CreditCardCompany parameter and passes it onto the ISession?

On Thu, Nov 20, 2008 at 11:39 PM, Tuna Toksöz <[EMAIL PROTECTED]> wrote:

> +1
>
> On Thu, Nov 20, 2008 at 11:35 PM, Victor Kornov <[EMAIL PROTECTED]> wrote:
>
>> Single table inheritance mapping with discriminator should work.
>>
>>
>> On Fri, Nov 21, 2008 at 12:32 AM, Jan Limpens <[EMAIL PROTECTED]>wrote:
>>
>>>
>>> A Creditcard has a CreditcardCompany
>>> here is one
>>>
>>> public abstract class CreditCardCompany
>>> {
>>>        private readonly string name;
>>>
>>>        protected CreditCardCompany(string name)
>>>        {
>>>                this.name = name;
>>>        }
>>> }
>>>
>>> public class Diners : CreditCardCompany
>>> {
>>>        public Diners() : base("Diners")
>>>        {
>>>        }
>>> }
>>>
>>> I will add some more logic to it, but no data. What is the easiest way
>>> to persist it (basically, I'd be fine with the Type.Name)?
>>> I looked into IUserType, but this looks a bit daunting :), especially
>>> for something as primitive.
>>>
>>> I wonder if there is something readymade already. There are a lot of
>>> classes in NHibernate.Type but which is which?
>>>
>>> --
>>> Jan
>>> ___________________
>>> [EMAIL PROTECTED]
>>> www.limpens.com
>>> +55 (11) 3082-1087
>>> +55 (11) 3097-8339
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Tuna Toksöz
> http://www.tunatoksoz.com
>
> Typos included to enhance the readers attention!
>
>
>
> >
>

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