In a content entity definition, I’ve got the following:
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { $fields = parent::baseFieldDefinitions($entity_type); $fields['frames'] = BaseFieldDefinition::create('string') ->setLabel(t('Frames')) ->setDescription('A serialized representation of the given frames'); return $fields; }
This is creating the column type in the database as varchar, with a maxlength of 255. I need the column to be type text, as the length will be unknown, and often more than 255. Does anybody know how to create a BaseFieldDefinition that becomes type ‘text’ in the database when the content entity is enabled?