Code example for MappingException

0
			throw new MappingException(
				"only inverse one-to-many associations may use on-delete=\"cascade\": "  
				+ getRole() );
		} 
		if ( !getKey().isValid( mapping ) ) {
			throw new MappingException(
				"collection foreign key mapping has wrong number of columns: " 
				+ getRole()
				+ " type: " 
				+ getKey().getType().getName() );
		} 
		if ( !getElement().isValid( mapping ) ) {
			throw new MappingException( 
				"collection element mapping has wrong number of columns: " 
				+ getRole()
				+ " type: " 
				+ getElement().getType().getName() );
		} 
 
		checkColumnDuplication();