fix fk field return invalid sql