XF 2.0 Read-only error on entity?

Jaxel

Well-known member
I have an entity:
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?
 
Back
Top Bottom