Inheritance - .Save() on newly specialized object

Posts   
 
    
Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 07-May-2010 16:13:26   

Hello,

v2.6 (ORMSupportclasses: 2.6.9.807)

There is a representation of my problem:

I have an entity employee that derive from an entity person (employee sub-type of person). I have a relation between person and telephone (1-m with cascade-delete).

A person (Say "Joe") already exists with few telephone entity hooked to it (not yet an employee). But Joe become an employee. I tried to create an employee, transfer every fields from person to joe and "Save". It returns true but fail to create my newly employee entity with existing person entity.

Can I do that (specialize an already existing person to an employee) without deleting the existing person ?

If yes, how ?

Thanks, Eric

Note: I tried to force "IsNew" as false without success either.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 08-May-2010 03:00:17   

In short: no. Please read the following discussion for deep explanation: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=14835

David Elizondo | LLBLGen Support Team
Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 10-May-2010 15:38:38   

Thanks a lot Dealmo.

I'm totally sure Frans is wrong about that. But I will let time (and other users) change is mind about promotion and demotion. stuck_out_tongue_winking_eye

Thanks (I will wait... wink ) Eric