mmm, AFAIK , there are no metal detectors in AVE (Alta Velocidad - High Speed) trains in any of the 5 or so routes we have in Spain (just took a couple of them a week ago). They do we have a small x ray machine for carry on baggage, but the process is ridiculously fast (about 5 - 10 seconds total).
This is really important if you think that we do have an in active terrorist (or political liberation, according to some) group in Spain, which targeted those trains in the past.