Update system attributes (changedDate etc.) on Core.commit if changes were added via setters generated by Mendix - Mendix Forum

Update system attributes (changedDate etc.) on Core.commit if changes were added via setters generated by Mendix

27

Dear Mendix Team,

There is an issue with updating system attributes (changedDate, changedBy etc) if an object was committed in Java action and generated setter was used to change entity field.

For instance, I have entity called "Item" in domain model, which has all system attributes and integer attribute called "Price". In custom Java action I use setPrice method to change the price:

final Item item = Microflows.getItemByName(getContext(), name);
item.setPrice(price.intValue());
item.commit();

After committing this object the changedDate is not updated.

I noticed that Core.change can be used to set attributes and it also updates system attributes after commit, but it is not handy, badly documented and non-intuitive.

asked
3 answers

Isn’t this a bug instead of an idea? I just filed an incident for this to get it addressed as a bug.

Created

It would be indeed very convenient to have this feature.

Created

This feature is quite crucial to have.

Created