This topic contains 3 replies, has 2 voices, and was last updated by Yurii Muratov 8 years, 6 months ago.
- Topic
Hi, I created a custom bundle with a custom entity.
In my migrations I added
AttachmentExtensionAwareInterface
/**
* {@inheritdoc}
*/
public function up(Schema $schema, QueryBag $queries)
{
$table = $schema->createTable('emuse_businesscard');
$table->addColumn('id', 'integer', ['autoincrement' => true]);
$table->addColumn('owner_id', 'integer', ['notnull' => false]);
$table->addColumn('createdAt', 'datetime', []);
$table->addColumn('updatedAt', 'datetime', ['notnull' => false]);
$table->setPrimaryKey(['id']);
$table->addIndex(['owner_id'], 'IDX_2F32390A7E3C61F9', []);
self::addUploadToBusinessCard($schema, $this->attachmentExtension);
}/**
* @param Schema $schema
* @param AttachmentExtension $attachmentExtension
*/
public static function addUploadToBusinessCard(Schema $schema, AttachmentExtension $attachmentExtension)
{
$attachmentExtension->addImageRelation(
$schema,
'emuse_businesscard',
'businesscard_upload',
[],
2,
1024,
768
);
}But when I run my migrations I get an error:
php app/console oro:migration:load --dry-run --show-queries
An extend field "businesscard_upload" cannot be added to non extend entity "eMuse\Bundle\BusinessCardBundle\Entity\BusinessCardEntity".
How can I make my entity extendable, or what is the best way to add an attachement ?
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.