A bug fixed for code generation of foreign keys.