Issue Task Closed

#94961Add automatic mapping for tstamp and crdate fields

Xavier Perseguers 08/23/21, 11:08 updated 11/01/26, 10:43

Description

Many users are struggling getting the DB columns tstamp and crdate mapped with their domain model.

What they do is adding a member field to their domain model and corresponding getter:

/**
 * tstamp
 * @var int
 */
protected $tstamp = 0;

public function getTstamp(): int
{
    return $this->tstamp
}

as they do with all their other fields, but this never works and they keep asking about the way to go in the Slack channel.

The solution is straightforward when one knows about it: it’s all about adding the “missing” TCA definition for tstamp as a passthrough and that’s it.

Suggestion

Common columns such as

  • crdate
  • tstamp

(possibly others as well)

should be automatically configured as passthrough if they are not already defined (e.g., when a developer configures the tstamp with a custom renderer to show the last modification to their editors).

This would be the most straightforward I’d say.

Alternatively, Extbase could be taught about those fields.

Rationale

Getting those creation and modification dates into one’s domain model is a really common use case. Struggling getting those dumb information mapped is hurting the developer experience.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-11-01T10:43:31+00:00" > 11/01/26, 10:43 </span>

    1. is merged, so this is now solved – could have been closed already with marking as duplicate