private void ensureUniqueProperties ( EmbeddedMetadata embeddedMetadata , StorageStrategy storageStrategy ) { if ( embeddedMetadata . getStorageStrategy ( ) == StorageStrategy . EXPLODED ) { for ( PropertyMetadata propertyMetadata : embeddedMetadata . getPropertyMetadataCollection ( ) ) { updateMasterPropertyMetadataMap ( propertyMetadata . getMappedName ( ) , embeddedMetadata . getField ( ) . getQualifiedName ( ) + "." + propertyMetadata . getName ( ) ) ; } // Run through the nested embedded objects recursively for ( EmbeddedMetadata embeddedMetadata2 : embeddedMetadata . getEmbeddedMetadataCollection ( ) ) { ensureUniqueProperties ( embeddedMetadata2 , storageStrategy ) ; } } else { // IMPLODED storage strategy... we don't have to check the // individual properties or nested embeddables updateMasterPropertyMetadataMap ( embeddedMetadata . getMappedName ( ) , embeddedMetadata . getField ( ) . getQualifiedName ( ) ) ; } }
Validates the embedded field represented by the given metadata to ensure there are no duplicate property names defined across the entity .