private function propertyNeedsMapping(ClassMetadata $class, \ReflectionProperty $property)
    {
        if ($class->isMappedSuperclass && !$property->isPrivate()) {
            return false;
        }

        $inherited = $class->hasAttribute($property->name) && $class->getPropertyMetadata($property->name)->isInherited;

        return !$inherited || $property->getDeclaringClass()->name === $class->name;
    }
private function propertyNeedsMapping(ClassMetadata $class, \ReflectionProperty $property)
    {
        if ($class->isMappedSuperclass && !$property->isPrivate()) {
            return false;
        }

        $inherited = $class->hasAttribute($property->name) && $class->getPropertyMetadata($property->name)->isInherited;

        return !$inherited || $property->getDeclaringClass()->name === $class->name;
    }
private function propertyNeedsMapping ( ClassMetadata $ class , \ ReflectionProperty $ property ) { if ( $ class -> isMappedSuperclass && ! $ property -> isPrivate ( ) ) { return false ; } $ inherited = $ class -> hasAttribute ( $ property -> name ) && $ class -> getPropertyMetadata ( $ property -> name ) -> isInherited ; return ! $ inherited || $ property -> getDeclaringClass ( ) -> name === $ class -> name ; }
Check if the specified property needs to be mapped.

For superclasses, mapping is handled at the child class level except in case
of private properties. For inheritance, it's handled by the declaring class.

@param ClassMetadata       $class
@param \ReflectionProperty $property

@return bool

@todo move to ClassMetadataFactory?
Check if the specified property needs to be mapped .