Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when extending Job class #139

Open
inmarelibero opened this issue Nov 23, 2020 · 2 comments
Open

Error when extending Job class #139

inmarelibero opened this issue Nov 23, 2020 · 2 comments

Comments

@inmarelibero
Copy link

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

@inmarelibero
Copy link
Author

@mmucklo up

@mmucklo
Copy link
Owner

mmucklo commented Aug 17, 2021

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants