Kunstmaan / KunstmaanBundlesStandardEdition

The "Kunstmaan Bundles Standard Edition" distribution
http://bundles.kunstmaan.be
MIT License
89 stars 39 forks source link

Entity has to be part of discriminator map. #132

Closed jfgrissom closed 9 years ago

jfgrissom commented 9 years ago

I was following the directions here: Kunstmaan Symfony2 Bundles installation

When I get to:

app/console doctrine:schema:create

I get this:

[Doctrine\ORM\Mapping\MappingException]                                                                                                                                               
Entity 'Kunstmaan\FormBundle\Entity\FormSubmissionField' has to be part of the discriminator 
map of 'Kunstmaan\FormBundle\Entity\FormSubmissionField' to be properly mapped in the 
inheritance hierarchy. Alternatively you can make 
'Kunstmaan\FormBundle\Entity\FormSubmissionField' an abstract class to avoid this 
exception from occurring.  

I see that this was fixed in the bundle 7 days ago... https://github.com/Kunstmaan/KunstmaanBundlesCMS/issues/256

But... when I install with the latest:

composer create-project -s dev kunstmaan/bundles-standard-edition myprojectname

I still get the same error.

Is this the correct command to get the latest or is there something else I need to run?

denbatte commented 9 years ago

Hi,

Thank you for reporting.

We are aware of the issue. It has been fixed here https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/258 and is present in the master branch. It will be soon included in stable when we release the next tag.

To quick fix the issue you just need to make Kunstmaan\FormBundle\Entity\FormSubmissionField a abstract class or you can update your Kunstmaan bundles to the latest "pre"-release by defining the master branch in your composer.json

Also fyi, if you use the quick fix above: in one of the next steps they ask you to use the command "gulp build" but in the version you are currently running, this still needs to be "grunt build".

Hope this will help you.

roderik commented 9 years ago

I've just released 3.0.3 with a backport of this fix. It should work now.

jfgrissom commented 9 years ago

You guys are pure awesome. Thank you so much!