I'm making a simple model in a prestashop module and I can't make it load data from the table lang.
class Type extends ObjectModel
{
/** @var int */
public $id_type;
/** @var varchar */
public $titre;
/** @var text */
public $content;
/** @var varchar */
public $tags;
public static $definition = array(
'table' => 'type',
'primary' => 'id_type',
'fields' => array(
'titre' => array('type' => self::TYPE_STRING, 'required' => true, 'lang' => true),
'content' => array('type' => self::TYPE_STRING, 'required' => true, 'lang' => true),
'tags' => array('type' => self::TYPE_STRING, 'required' => true),
),
);
}
database :
ps_type [id_type, id_shop_group, id_shop, tags]
ps_type_lang [id_type, id_lang, titre, content]
When I load a row from the database like new Type(1); I have the tag field but not the titre and content. Did I miss something?