mapping.type( Marathon.class )
.property( "name", METHOD )
.constraint( new NotNullDef() )
.type( Tournament.class )
.property( "tournamentDate", METHOD )
.constraint( new FutureDef() );
config.addMapping( mapping );
Validator validator = config.buildValidatorFactory().getValidator();
Marathon marathon = new Marathon();
marathon.setName( "New York Marathon" );