OnUpdated Event - OldColumnValues Empty

Hello,

The OnUpdated event subscribed to an Aurelius Map receive the Args: TUpdatedArgs.
The TUpdatedArgs is a class that contain OldColumnValues and ChangedColumnNames.
Why I'm getting both them nil when the event fire?
(NewColumnValues instead is valorized)


The same with the Event OnUpdating

Because the operation you are doing, somehow, does not allow Aurelius to know the old state of the object. For example, that can happen if you use Manager.Update(SomeObject). Is that the case?

I use a TAureliusDataset with a Post after a change into a grid.
The changes persist into a DB, the event fire but no OLD values at all... nil value.

I'm sorry, but that looks like the same problem you reported with the Delete. That simply works, I retested it here.

Your code, somehow, is "removing" the object from the manager, or it's not including it at all. Thus the dataset is calling Manager.Update and including the object in the manager directly, that's the reason why you don't have ChangedColumnNames and other properties that indicate previous state.
But that happens because when you call Post, your object is not in the manager. I don't know why, you have to review your code or try to send us a project that reproduces the problem.

Wagner R. Landgraf2018-06-12 16:18:39

Thanks to your help I was able to solve both the issue.

The manager I passed to the TAureliusDataset was not the same used to obtain the TCriteria. Aurelius was working fine.

Sorry for that and thanks for the support.

Hi Luca, thank you for the feedback. I'm glad you solved it.