Skip to content

Commit

Permalink
Throw an exception if the fieldName of a children field is blank
Browse files Browse the repository at this point in the history
  • Loading branch information
craig committed Jun 9, 2012
1 parent fec02f4 commit 41039a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/ODM/PHPCR/Mapping/ClassMetadata.php
Expand Up @@ -581,7 +581,7 @@ protected function validateAndCompleteReferrersMapping($mapping)

protected function validateAndCompleteFieldMapping($mapping, $isField = true)
{
if (!isset($mapping['fieldName'])) {
if (!isset($mapping['fieldName']) || empty($mapping['fieldName'])) {
throw new MappingException("Mapping a property requires to specify the fieldName.");
}

Expand Down

0 comments on commit 41039a4

Please sign in to comment.