-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I want to extends the Command
Entity (synolia_commands
table) but I can't. Doctrine want to create another table indeed.
To Reproduce
Steps to reproduce the behavior:
- Create the Entity
<?php
declare(strict_types=1);
namespace App\Scheduler\Entity;
use Doctrine\ORM\Mapping as ORM;
use Synolia\SyliusSchedulerCommandPlugin\Entity\Command as BaseCommand;
/**
* @ORM\Entity
*/
#[ORM\Entity]
class Command extends BaseCommand
{
}
- Add this Entity in config (
_sylius.yaml
)
synolia_sylius_scheduler_command:
resources:
synolia.command:
driver: doctrine/orm
classes:
model: App\Scheduler\Entity\Command
- Add this Entity in config (
doctrine.yaml
)
App\Scheduler:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Scheduler/Entity'
prefix: 'App\Scheduler\Entity'
alias: App\Scheduler
- See error
Launchbin/console d:s:v -vv
It returns:
CREATE TABLE Command (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, command VARCHAR(255) NOT NULL, arguments VARCHAR(255) DEFAULT NULL, cronExpression VARCHAR(255) NOT NULL, logFilePrefix VARCHAR(255) DEFAULT NULL, priority INT NOT NULL, executeImmediately TINYINT(1) NOT NULL, enabled TINYINT(1) NOT NULL, timeout INT DEFAULT NULL, idleTimeout INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB;
Expected behavior
Is it possible to change Entity
to MappedSuperclass
?
mneuville and RomainDev85
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working