Jaxel
Well-known member
I have an entity:
When clicking on my edit form... which allows me to edit 'template_id', I am getting the following error:
'template_id' is not marked as read-only. Why am I getting this error?
Code:
$structure->table = 'ewr_carta_templates';
$structure->shortName = 'EWR\Carta:Template';
$structure->primaryKey = 'template_id';
$structure->columns = [
'template_id' => ['type' => self::STR, 'required' => true, 'match' => 'alphanumeric_hyphen'],
'template_content' => ['type' => self::STR, 'required' => true],
];
When clicking on my edit form... which allows me to edit 'template_id', I am getting the following error:
InvalidArgumentException: Column 'template_id' is read only, can only be set with forceSet in src/XF/Mvc/Entity/Entity.php at line 550
'template_id' is not marked as read-only. Why am I getting this error?