public void validate(Mapping mapping) throws MappingException { super.validate(mapping); if (!getIndex().isValid(mapping)) { throw new MappingException( "collection index mapping has wrong number of columns: " + getRole() + " type: " + getIndex().getType().getName()); } if (indexNodeName != null && !indexNodeName.startsWith("@")) { throw new MappingException("index node must be an attribute: " + indexNodeName); } }