$loaded = false;
$enabledForClass =
$this->
isAutoMappingEnabledForClass($metadata,
$this->classValidatorRegexp
);
/* Available keys:
- type
- scale
- length
- unique
- nullable
- precision
*/
$existingUniqueFields =
$this->
getExistingUniqueFields($metadata);
// Type and nullable aren't handled here, use the PropertyInfo Loader instead.
foreach ($doctrineMetadata->fieldMappings
as $mapping) { $enabledForProperty =
$enabledForClass;
$lengthConstraint = null;
foreach ($metadata->
getPropertyMetadata($mapping['fieldName'
]) as $propertyMetadata) { // Enabling or disabling auto-mapping explicitly always takes precedence
if (AutoMappingStrategy::DISABLED ===
$propertyMetadata->
getAutoMappingStrategy()) { continue 2;
} if (AutoMappingStrategy::ENABLED ===
$propertyMetadata->
getAutoMappingStrategy()) {