Can't update custom module record, based on person

Created a brand new custom module based on person.

Then, we create a record, but when we try to update the record, it fails.

This is the traceback:
Warning: Invalid argument supplied for foreach()

0: {file: "/crm/public/legacy/include/portability/ApiBeanMapper/ApiBeanMapper.php",…}
1: {file: "/crm/public/legacy/include/portability/ApiBeanMapper/ApiBeanMapper.php",…}
2: {file: "/crm/core/backend/Data/LegacyHandler/RecordHandler.php", line: 268,…}
3: {file: "/crm/core/backend/Data/LegacyHandler/RecordHandler.php", line: 240,…}
4: {file: "/crm/core/backend/Process/DataPersister/RecordDataPersister.php", line: 68,…}
5: {file: "/crm/vendor/api-platform/core/src/DataPersister/ChainDataPersister.php",…}

I am using version 8.1