Bug fix : companies fixtures loading fails (Option->text is an json_array)

This commit is contained in:
Marc Ducobu 2021-02-08 23:00:18 +01:00
parent 4f90561362
commit e083ca7487
2 changed files with 28 additions and 41 deletions

View File

@ -68,21 +68,8 @@ class LoadOption extends AbstractFixture implements OrderedFixtureInterface
echo "Loading Options \n";
// load companies
/*
* TODO sf4 - disabled to avoid error :
*
* An exception occurred while executing 'INSERT INTO custom_field_long_choice_options (id, key, text, internal_key, active, parent_id)
* VALUES (?, ?, ?, ?, ?, ?)' with params [1153, "company", {"fr":"Grandes Entreprises","nl":"Grotes Bedrijven","en":"Big Companies"}, "", 1, null]:
*
* SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type json
* DETAIL: Token "Array" is invalid.
* CONTEXT: JSON data, line 1: Array
*
*/
//$this->loadingCompanies($manager);
//$this->loadingWords($manager);
$this->loadingCompanies($manager);
$this->loadingWords($manager);
$manager->flush();

View File

@ -50,7 +50,7 @@ class Option
* A json representation of text (multilingual)
*
* @var array
* @ORM\Column(type="text")
* @ORM\Column(type="json_array")
*/
private $text;