}
private Type embeddedPropertyType(List<String> propertyPath, ComponentType propertyType) {
Type subType = propertyType;
for ( int i = 1; i < propertyPath.size(); i++ ) {
ComponentType componentType = (ComponentType) subType;
String name = propertyPath.get( i );
int propertyIndex = componentType.getPropertyIndex( name );
subType = componentType.getSubtypes()[propertyIndex];
if ( subType.isAnyType() || subType.isAssociationType() || subType.isEntityType() ) {
throw new UnsupportedOperationException( "Queries on associated entities are not supported yet." );
}
}
return subType;