Hi Rene, here's an idea for a solution
Hope that helps.
I would solve it differently. Retrieve the SuperEmployees, iterate over them. In the iteration create a new employee object and copy all the data including all the references etc over to the new object. Also retrieve all the objects the SuperEmployee has a reference with because these also needs to be update to the new employee object. It is indeed probably quite some work depending on how many references the object has. You could try the community commons deepclone but I am not 100 procent sure it works wit generalizations. Normally you need two objects of the same type but in this case it might work.
I agree with Ronald. Do all of this in a microflow that you run one time to transform your data. This way you can create a new employee object for every super employee, and write all of the super employee associations to the new employee object.
You also talked about preserving the createdBy and OwnerBy system attributes. I dont think you can write to these attributes so what Thijs mentioned about creating your own attributes to store this data would be best.
In your microflow you can retrieve all employees and write the system createdby/owner attributes to the newly created attributes. Then retrieve all super employees and create employee objects for each super employee.
Hi Ronald and Austin, thanks for your responses! Unfortunatly, my story\question still seems to be unclear (or I misunderstand the responses). I know\understant I can re-create the employees in the correct entity by making a conversion and iterate over all the SuperEmployees. I consider that as basic mendix knowledge. I also thought already about several ways to save the CreatedBy and ChangedBy information for the user object itself, that is also clear.
But, apart from the fact that iterate and convert all SuperEmployees (+20 references, +60attributes) is a long work\proces, the true question how to prevent the loss of CreatedBy and ChangedBy on all the other identities in the application is unanswered.
Let's say the application also has an entity called "Order". On that entity the 'Store owner' and 'Store changeby' options are activated. (Technically, it means that the platform will write the GUID of the creating or changing user in the table of "Order"). When I delete the SuperEmployee enitity after re-creating the users like suggested, the CreatedBy and the Changed by of all the Order object will be set to null. Now imagine that this will be done for all the +100 entity's in a application that track CreatedBy and ChangedBy....
So that is the real question and why I am looking in a way of "Downgrading" a generalization object.