Why Does Moqui Only Have lastUpdatedStamp not createdStamp?

Hello everyone,

I am coming from OFBiz and noticed that in Moqui, we only have the lastUpdatedStamp field, whereas OFBiz includes additional timestamp fields like createdStamp, lastUpdatedStamp, createdTxStamp, and lastUpdatedTxStamp.

I was wondering if there is a specific reason behind this design choice. I particularly miss the createdStamp field, as it is useful when syncing data with other systems.

Would love to hear your insights. Thanks in advance!

There were plans to add a createdStamp for syncing with the entity-detail-new branch.

I think a createdStamp is a good idea. Especially if you have a good use case for it.

Although I’m not sure why we would need or use a createdTxStamp / lastUpdatedTxStamp.

2 Likes

Here is the PR to add createdStamp support:

This adds support for automatically setting createdStamp on entity creation, providing an immutable creation timestamp alongside lastUpdatedStamp.

5 Likes

createdStamp deserves to be a default field for a few simple reasons:

  • Auto-set, zero effort — populated automatically at record creation if not already provided. No extra code needed.
  • Immutable by design — unlike lastUpdatedStamp, it never changes, so it’s always a reliable answer to “when did this record enter the system?”
  • Invaluable for debugging — when something breaks, correlating records by creation time is often the fastest way to find the cause.
  • Useful for BI and reporting — cohort analysis, dashboards, exports — almost every analytical use case benefits from a creation timestamp. Retrofitting it later is painful.
1 Like

I don’t think this is worth implementing as a nice to have though.

If someone has a non-manufactured critical use case for it it’s worth merging, otherwise the cost of the easily gigabyte of space that would take up on moqui servers around the world isn’t worth it imho.