Closed succinct closed 9 years ago
I encountered this issue as well, but it was due to extending the wrong Tagging class (namespace error). Be sure to use the proper namespace...
<?php
use FPN\TagBundle\Entity\Tagging as BaseTagging
@yanickj thanks for the reply; I did notice that the namespace was erroneous, and I still get the same errors after fixing it.
@succinct did you run a doctrine migration after you updated the BaseTagging class? I forgot to mention that in my previous comment.
@yanickj we're not using the doctrine migrations bundle, is it required for this?
I meant to say that I had to update the schema after putting the correct namespace for the parent class.
Forgive me if you have already tried this, but I had to run the following after I resolved the namespace error:
app/console doctrine:migrations:diff;
app/console doctrine:migrations:migrate;
The migrate command will alter your schema so all cautions apply.
I'm using Symfony 2.4.3 and am also unable to generate the correct database scheme. It seems like my Tag
and Tagging
entity do not inherit the fields of the parent BaseTag
and BaseTagging
when using Annotations.
[Doctrine\DBAL\Schema\SchemaException]
There is no column with name 'resource_type' on table 'Tagging'.
Fixing the namespace does not solve the problem for me. It looks like using annotations can not be combined with the Tag.orm.xml
file
I was able to fix this by defining all fields, and adding the ORM annotations. The slug automatically is updated via Sluggable
I followed the instructions in readme.md (using the Annotation version), and when I try to call
$tagManager->loadOrCreateTag('reptile')
I receive the following errors:I couldn't get the XML version to worth either - it throws this error:
Additonally, I'm unable to call
php app/console doctrine:generate:schema
due to the following error: