This topic contains 1 reply, has 2 voices, and was last updated by Andrey Yatsenko 4 years, 3 months ago.
- Topic
Hello,
I have a problem that I do not understand. When I run the command
php bin / console oro: migration: load --force
I have an attribute problem already declared. I think the problem comes from linking, I renamed it I had the same problem.12345678910111213141516> Oro\Bundle\EntityExtendBundle\Migration\CleanupCampaignMigration> Oro\Bundle\EntityExtendBundle\Migration\RefreshExtendCacheMigration> Oro\Bundle\EntityConfigBundle\Migration\UpdateEntityConfigMigration> Oro\Bundle\EntitySerializedFieldsBundle\Migration\SerializedDataMigration> Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendConfigMigration[WARNING] Some commands could not be registered:In MappingException.php line 381:Property "user" in "Dnd\Task\Component\Model\Quenty" was already declared,but it must be declared only onceoroplatform/src/src/Dnd/Task/Component/Model/Quenty.php
12345678910111213141516171819202122232425262728/*** @ORM\Table(name="dnd_task_Quenty",indexes={@ORM\Index(name="external_id_idx", columns={"external_id"})})* @ORM\Entity(repositoryClass="Dnd\Task\Bundle\Repository\Quenty")* @Config()*/class Quenty extends ExtendQuenty implements QuentyInterface{use ExternalTrait;/*** Description $id field** @ORM\Column(name="id", type="integer")* @ORM\Id* @ORM\GeneratedValue(strategy="AUTO")** @var int $id*/protected $id;/*** Description $user field** @ORM\ManyToOne(targetEntity="Oro\Bundle\UserBundle\Entity\User")* @ORM\JoinColumn(name="user_id", referencedColumnName="id")** @var User|null $user*/protected $user;Class ExtendQuenty is empty.
oroplatform/src/src/Dnd/Task/Bundle/Migrations/Schema/v1_1/DndTaskBundle.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950class DndTaskBundle implements Migration, ExtendExtensionAwareInterface{/*** Description $extendExtension field** @var ExtendExtension $extendExtension*/protected $extendExtension;/*** {@inheritdoc}** @param ExtendExtension $extendExtension** @return void*/public function setExtendExtension(ExtendExtension $extendExtension): void{$this->extendExtension = $extendExtension;}/*** {@inheritdoc}** @param Schema $schema* @param QueryBag $queries** @return void* @throws SchemaException*/public function up(Schema $schema, QueryBag $queries): void{/** @var Table $table */$table = $schema->createTable('dnd_task_quenty');$table->addColumn('id', 'integer', ['autoincrement' => true]);$this->extendExtension->addManyToOneRelation($schema,$table,'user','oro_user','id',['extend' => ['owner' => ExtendScope::OWNER_CUSTOM,'on_delete' => 'SET NULL']]);}What problem do you think?
The forum ‘OroPlatform’ is closed to new topics and replies.