LLBLGen Pro 2.5
Adapter template
Hello:
I have created an Entity OrderDetail which has among other fields, idProcess and ProcessName.
IdProcess has a ForeignKey reference to process Table but I save the ProcessName because the name of process in Process table can go varying with time.
When the user selects the process in Combobox, this automatically assigns the ID from Process Entity to IDProcess in OrderDetail entity, but also desire that assign the Process.Name to OrderDetail.ProcessName automatically.
I was occurring 3 options:
-To do so with a trigger from the table OrderDetail.
-To do so by code outside the logic of the entity.
-To do so with custom code inside the logic of the entity. (Desired)
I would do so in as possible with the third option but is not that event should override already that do not see a BeforeSaveEntity event.
My idea is that within the logic of the entity OrderDetail, prior to save check the name of the Process entity assigned and it be allocated to field OrderDetail.ProcessName
Sorry by the translation.
Regards