The ECB do not set the the rate on fixed term loans. The only mortgages on which the ECB rates have a direct effect are 'tracker' rate mortgages. Variable rate mortgages don't necessary have to follow the ECB rate, though they generally do.
Fixed rate mortgages are based on the bank's expectations of the future cost of money, i.e. future interest rates. Also because of the reduced risk to the borrower the bank will add on a premium for taking on the higher risk. That is, the risk that interest rate rise but because it is a fixed rate the bank can't add on the increased cost of money.
Fixed rates over 1, 2, 5, 10 or more years are based on interest rate expectations and the premium the bank requires to take the risk. Granted this can be offset by the risk the borrower takes in the event that interest rates go down, in which case the bank gains.