private void validateCollectionValuedPathExpression(Expression expression,
boolean collectionTypeOnly) {
// The path expression resolves to a collection-valued path expression
CollectionValuedPathExpression collectionValuedPathExpression = collectionValuedPathExpression(expression);
if (collectionValuedPathExpression != null &&
collectionValuedPathExpression.hasIdentificationVariable() &&
!collectionValuedPathExpression.endsWithDot()) {
// A collection_valued_field is designated by the name of an association field in a
// one-to-many or a many-to-many relationship or by the name of an element collection field
Resolver resolver = getResolver(expression);
IType type = resolver.getType();