protected String getColumn(OgmEntityPersister persister, List<String> propertyPath) {
		Iterator<String> pathIterator = propertyPath.iterator();
		String propertyName = pathIterator.next();
		Type propertyType = persister.getPropertyType( propertyName );
		if ( !pathIterator.hasNext() ) {
			if ( isElementCollection( propertyType ) ) {
				Joinable associatedJoinable = ( (AssociationType) propertyType ).getAssociatedJoinable( persister.getFactory() );
				OgmCollectionPersister collectionPersister = (OgmCollectionPersister) associatedJoinable;
				// Collection of elements
				return collectionPersister.getElementColumnNames()[0];
			}
			return persister.getPropertyColumnNames( propertyName )[0];
		}
		else if ( propertyType.isComponentType() ) {
			// Embedded property
			String componentPropertyName = StringHelper.join( propertyPath, "." );
			return persister.getPropertyColumnNames( componentPropertyName )[0];
		}
		else if ( propertyType.isAssociationType() ) {
			Joinable associatedJoinable = ( (AssociationType) propertyType ).getAssociatedJoinable( persister.getFactory() );
			if ( associatedJoinable.isCollection() ) {
				OgmCollectionPersister collectionPersister = (OgmCollectionPersister) associatedJoinable;
				if ( collectionPersister.getType().isComponentType() ) {
					StringBuilder columnNameBuilder = new StringBuilder( propertyName );
					columnNameBuilder.append( "." );

					// Collection of embeddables
					appendComponentCollectionPath( columnNameBuilder, collectionPersister, pathIterator );
					return columnNameBuilder.toString();
				}
			}
		}
		throw new UnsupportedOperationException( "Unrecognized property type: " + propertyType );
	}
protected String getColumn ( OgmEntityPersister persister , List < String > propertyPath ) { Iterator < String > pathIterator = propertyPath . iterator ( ) ; String propertyName = pathIterator . next ( ) ; Type propertyType = persister . getPropertyType ( propertyName ) ; if ( ! pathIterator . hasNext ( ) ) { if ( isElementCollection ( propertyType ) ) { Joinable associatedJoinable = ( ( AssociationType ) propertyType ) . getAssociatedJoinable ( persister . getFactory ( ) ) ; OgmCollectionPersister collectionPersister = ( OgmCollectionPersister ) associatedJoinable ; return collectionPersister . getElementColumnNames ( ) [ 0 ] ; } return persister . getPropertyColumnNames ( propertyName ) [ 0 ] ; } else if ( propertyType . isComponentType ( ) ) { String componentPropertyName = StringHelper . join ( propertyPath , "." ) ; return persister . getPropertyColumnNames ( componentPropertyName ) [ 0 ] ; } else if ( propertyType . isAssociationType ( ) ) { Joinable associatedJoinable = ( ( AssociationType ) propertyType ) . getAssociatedJoinable ( persister . getFactory ( ) ) ; if ( associatedJoinable . isCollection ( ) ) { OgmCollectionPersister collectionPersister = ( OgmCollectionPersister ) associatedJoinable ; if ( collectionPersister . getType ( ) . isComponentType ( ) ) { StringBuilder columnNameBuilder = new StringBuilder ( propertyName ) ; columnNameBuilder . append ( "." ) ; appendComponentCollectionPath ( columnNameBuilder , collectionPersister , pathIterator ) ; return columnNameBuilder . toString ( ) ; } } } throw new UnsupportedOperationException ( "Unrecognized property type: " + propertyType ) ; }
Returns the names of all those columns which represent a collection to be stored within the owning entity
structure (element collections and/or *-to-many associations, depending on the dialect's capabilities).