Discutea / DForumBundle

Forum Bundle for symfony 3
28 stars 13 forks source link

How to override entities #16

Closed mistris closed 7 years ago

mistris commented 7 years ago

Hi!

How can I override entities of this bundle? I want to:

I tried to make my own Forum bundle. I have already overridden controllers and views, but entities just don't work as expected - indexes are not added after schema update (if I don't specify the table name in my extended entity "Post").

But if I specify the same table name "df_post" like this image

then during schema update I get the following error "The table name 'df_post' already exists" although the DB doesn't contain this table.

I also tried to put the following lines in my config.yml:

doctrine:
    orm:
       resolve_target_entities:
          Discutea\DForumBundle\Entity\Post: ForumBundle\Entity\Post

but it didn't help.

Can anyone please help me?

mistris commented 7 years ago

Found solution: https://github.com/joschi127/doctrine-entity-override-bundle