Skip to content

Error when extending Job class #139

Open

Description

@inmarelibero

When following https://github.com/mmucklo/DtcQueueBundle#rename-the-database-or-table-name, I get the error The table with name 'dtc_queue_job' already exists.

config/packages/dtc_queue.yaml

dtc_queue:
    class:
        job: App\Entity\DtcJob

src/Entity/DtcJob.php

<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;

use Dtc\QueueBundle\Entity\Job as BaseJob;

/**
 * @ORM\Entity
 * @ORM\Table(name="dtc_queue_job")
 */
class DtcJob extends BaseJob
{
}

I guess that Doctrine tries to load my class AND the Job class in the bundle, generating exception correctly because there cannot be two entities with the same table name

If I change the table name everything goes well, but table dtc_queue_job is created anyway, which bothers me

Activity

  1. inmarelibero commented on Nov 30, 2020

    @inmarelibero
    Author
  2. mmucklo commented on Aug 17, 2021

    @mmucklo
    Owner

    @inmarelibero Sorry for the delay, I recall looking into this a while back, but I didn't have a viable solution at the time.

    I'm open to suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions