I don't feel it's a bug.
The "type' property is a technical resource and is not part of the business
as of DDD way of thinking i.e it is not a real property in real life.
If you really need this property (for indexing, I need it in a project),
you can make of method which explore annotations like this :
(here it is for MongoDb but for any ORM it's the same thing) and my base
class is abstract so array_search always find something.
public function getKeyType()
{
$reader = new \Doctrine\Common\Annotations\AnnotationReader();
$mapping = $reader->getClassAnnotation(new
\ReflectionClass(__CLASS__),
'Doctrine\ODM\MongoDB\Mapping\Annotations\DiscriminatorMap');
return array_search(get_class($this), $mapping->value);
}
Hope this help
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en