if ( value instanceof Component ) {
Component comp = (Component) value;
parentPropIter = comp.getPropertyIterator();
}
else if ( value instanceof ToOne ) {
ToOne toOne = (ToOne) value;
PersistentClass referencedPc = mappings.getClass( toOne.getReferencedEntityName() );
if ( toOne.getReferencedPropertyName() != null ) {
try {
parentPropIter = ( (Component) referencedPc.getRecursiveProperty(
toOne.getReferencedPropertyName()
).getValue() ).getPropertyIterator();
}
catch (ClassCastException e) {
throw new MappingException(
"dotted notation reference neither a component nor a many/one to one", e