今天在一个表中加了几个字段后再查询数据后出现以下问题:
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'rt_t_process' in 'field list'
### The error may exist in io/renren/modules/generator/dao/KdTaskDao.java (best guess)
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT id,task_type_id,scenario_id,name,start_time,stop_time,detailed,is_del,priority,state,father_id,rout_id,area_id,target_id,user_id,project_id,command_code_id,patrol_num,damage_ratio,guaranteed_car_id,attack_point,rt_results,rt_process,rt_order,rt_problem,car_color,xd_id,rt_t_process,rt_why_error,rt_t_why_error FROM kd_task LIMIT ?,?
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'rt_t_process' in 'field list'
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'rt_t_process' in 'field list'
org.springframework.jdbc.BadSqlGrammarException:
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'rt_t_process' in 'field list'
### The error may exist in io/renren/modules/generator/dao/KdTaskDao.java (best guess)
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT id,task_type_id,scenario_id,name,start_time,stop_time,detailed,is_del,
原因:
mysql表中加的字段设置为了text ,上网找了资料说可以是传递过来是空的,字段就找不了。
解决方法:
把text 更改为varchar ,问题就不出现了
r