indeed! I said something wrong, it is not a mapping problem, it is a problem
in the domain model. I agree 100% with Diego.

2010/9/16 Diego Mijelshon <[email protected]>

> Your object model is not correct.
> The correct relationship is not "An Administrator is an Employee" but "An
> Employe has the Administrator role".
>
>     Diego
>
>
>
> On Thu, Sep 16, 2010 at 19:22, Matt Mangold <[email protected]>wrote:
>
>> In my application, I have an object hierarchy of Person->Employee-
>> >Administrator.
>>
>> I want to be able to take an existing employee and make them an
>> administrator.
>>
>> I know that in OO world, this is not possible, you must first destroy
>> the employee object create a new Administrator object and build out
>> the Administrator's properties to match the employee.
>>
>> I really don't want to go through all that work.  I much rather just
>> update the discriminator value for the employee in the database to an
>> administrator discriminator value.
>>
>> What are my options here?  I know that the right way to do it is to
>> delete the employee and create a new admin, but that is a lot of work
>> and is error prone due to all of the properties of the employee.
>>
>> This seems like a common scenario.  What is the best way to handle
>> this?
>>
>> --
>> 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]<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