I got the following entity
use Gedmo\Timestampable\Traits\TimestampableEntity;
/**
* @ORM\Entity
* @ORM\Table(name="users")
* @UniqueEntity(fields="email", message="Email already taken")
*/
class User
{
/**
* Hook timestampable behavior
* updates createdAt, updatedAt fields
*/
use TimestampableEntity;
…
if i run
$ php app/console doctrine:mapping:info
i get this error
found 8 mapped entities:
[OK] Gedmo\Translatable\Entity\MappedSuperclass\AbstractPersonalTranslation
[OK] Gedmo\Translatable\Entity\MappedSuperclass\AbstractTranslation
[OK] Gedmo\Translatable\Entity\Translation
[OK] Gedmo\Loggable\Entity\MappedSuperclass\AbstractLogEntry
[OK] Gedmo\Loggable\Entity\LogEntry
[OK] Gedmo\Tree\Entity\MappedSuperclass\AbstractClosure
[OK] Psren\CmsBundle\Entity\Group
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The annotation "@Gedmo\Timestampable" in property Psren\CmsBundle\Entity\User::$createdAt was never imported. Did you maybe forget to add a "use" statement for this annotation?
the annotation @Gedmo\Timestampable was defined in the trait of the extension. so it must have been loaded.
what went wrong?
thanks for help.
🙂
I just fortgot to load the annotations.