We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 708ed45 commit 8bebc82Copy full SHA for 8bebc82
Validator/DoctrineLoader.php
@@ -108,7 +108,7 @@ public function loadClassMetadata(ClassMetadata $metadata): bool
108
if (isset($mapping['originalClass']) && !str_contains($mapping['declaredField'], '.')) {
109
$metadata->addPropertyConstraint($mapping['declaredField'], new Valid());
110
$loaded = true;
111
- } elseif (property_exists($className, $mapping['fieldName'])) {
+ } elseif (property_exists($className, $mapping['fieldName']) && (!$doctrineMetadata->isMappedSuperclass || $metadata->getReflectionClass()->getProperty($mapping['fieldName'])->isPrivate())) {
112
$metadata->addPropertyConstraint($mapping['fieldName'], new Length(['max' => $mapping['length']]));
113
114
}
0 commit comments