Soft Delete - No mapping found for field (v2025)

PHPMaker v2025 with the latest template: 25.12.20.

Why I cannot implement Soft Delete for my users table (the one that will be used to authenticate user login)?

I got the following error message: D:\wamp\www\cba2025\vendor\doctrine\orm\src\Mapping\MappingException.php(121): No mapping found for field 'Tanggal_Hapus' on class 'PHPMaker2025\cba2025\Entity\User'.

I have setup all the necessary option under Table option → Delete Page for that users table:

  • Delete: enabled
  • Inline-Delete (Modal dialog): enabled
  • Soft delete field: Tanggal_Hapus
  • Hard delete (for soft delete): enabled
  • Time aware (for soft delete): enabled

The strange thing is, I created a Database View inside the same database that based on the single users table, and implement Soft Delete for that View, and it works properly.

The Soft Delete is working properly for other tables (including Database View that cloning the users table), but not for the users table itself.

Thoughts?

The error said:

It doesn’t seem to be related to the user table — it may have just happened to involve the user table by coincidence.

In the user entity (src/Entity/User.php), you should find PHP attribute like

#[SoftDeleteable(fieldName: 'Tanggal_Hapus', ...)]

If it is like above, try change it to the property name, e.g.

#[SoftDeleteable(fieldName: 'tanggalHapus', ...)]

and test again.

I did you suggested above, but it does not work, either.

Here is the error message:
D:\wamp\www\cba2025\vendor\doctrine\orm\src\Mapping\MappingException.php(121): No mapping found for field ‘tanggalHapus’ on class ‘PHPMaker2025\cba2025\Entity\User’.

But, if I changed tanggalHapus to TanggalHapus, then it works. The error is gone.

Any update/fix on this? So that we don’t need to modify the generated script over and over again?

Today I saw the template update regarding this, in entity.php file:

Old code:
#[SoftDeleteable(fieldName: ‘<#= SingleQuote(TABLE.SoftDeleteField) #>’, timeAware: <#= Code.bool(TABLE.SoftDeleteTimeAware) #>, hardDelete: <#= Code.bool(TABLE.HardDelete) #>)]

New code:
#[SoftDeleteable(fieldName: ‘<#= SingleQuote(GetFieldObject(TABLE, TABLE.SoftDeleteField).PropertyName) #>’, timeAware: <#= Code.bool(TABLE.SoftDeleteTimeAware) #>, hardDelete: <#= Code.bool(TABLE.HardDelete) #>)]

Now the issue has been resolved. Thanks.