This topic contains 2 replies, has 2 voices, and was last updated by Andrey Yatsenko 3 years, 9 months ago.
-
Topic
-
I am trying to add a text field into contact bundle from my custom bundle by following this tutorial
https://doc.oroinc.com/backend/entities/extend-entities/index#create-extended-entities
But no effect is showing neither in database nor in UI my code is in below.12345678910111213141516171819202122232425<?php// src/AppBundle/Migrations/Schema/v1_0/AddPartnerSinceToContact.phpnamespace AppBundle\Migrations\Schema\v1_0;use Doctrine\DBAL\Schema\Schema;use Oro\Bundle\EntityExtendBundle\EntityConfig\ExtendScope;use Oro\Bundle\MigrationBundle\Migration\Migration;use Oro\Bundle\MigrationBundle\Migration\QueryBag;class AddPartnerSinceToContact implements Migration{public function up(Schema $schema, QueryBag $queries){$table = $schema->getTable('orocrm_contact');echo $table;$table->addColumn('partnerSince', 'datetime', ['oro_options' => ['extend' => ['owner' => ExtendScope::OWNER_CUSTOM],],]);}}?>123456789101112131415161718192021<?php// src/AppBundle/Entity/Contact.phpnamespace AppBundle\Entity;use Doctrine\ORM\Mapping as ORM;use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config;use AppBundle\Entity\Model\ExtendContact;/*** @ORM\Entity()* @ORM\Table(name="orocrm_contact")* @Config()*/class Contact extends ExtendContact{}?>1234567891011121314151617181920212223242526272829<?php// src/AppBundle/Model/ExtendContact.phpnamespace AppBundle\Model;class ExtendContact{/*** A skeleton method for the getter. You can add it to use autocomplete hints from the IDE.* The real implementation of this method is auto generated.** @return \DateTime*/public function getPartnerSince(){}/*** A skeleton method for the setter. You can add it to use autocomplete hints from the IDE.* The real implementation of this method is auto generated.** @param \DateTime $partnerSince*/public function setPartnerSince(\DateTime $partnerSince){}}?>Then i am running this command in terminal but the field is not creating in database and also not in UI
1php bin/console oro:migration:load --force --timeout=0
The forum ‘OroCommerce’ is closed to new topics and replies.