Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Extended section model #109

@czende

Description

@czende

Hi, I want to add some other info into Section model, so I've overridden your resource in my config to use my model with extending your BaseSection and added Section.orm.yml with custom field. But when I try to launch doctrine:migrations:diff it always throw error: The table with name 'shop.bitbag_section' already exists.. I did it the same way as with the product model extensions and never seen this kind of error before. How do I find out where the problem is?

Thank you!

...app/config/resources.yml

sylius_resource:
    resources:
        bitbag.section:
            classes:
                model: AppBundle\Entity\Section
            translation:
                classes:
                    model: AppBundle\Entity\SectionTranslation

Model

namespace AppBundle\Entity;

use BitBag\CmsPlugin\Entity\Section as BaseSection;

class Section extends BaseSection {
...
}

...src/AppBundle/Resources/config/doctrine/Section.orm.yml

AppBundle\Entity\Section:
    type: entity
    table: bitbag_section
    fields:
        type:
            ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions