【发布时间】:2015-03-04 06:55:39
【问题描述】:
我正在使用 Groovy/Grails 框架,我正在使用
从 mysql 数据库中获取 Bigdecimal 值Query = "select d.quantitativeData FROM MyTable d where d.segment.id = " + segmentid +
" and d.sustainabilityIndicatorSubQuestion.id = "+questionid+" and d.tenantId= " +
TenantUtils.getCurrentTenant()+" order by d.id desc",[max:1]"
quantitativeData 是 Bidgecimal 变量。
但是从这个查询中检索到的值就像“0E-20”格式,但是数据库中的值像'121.00000000000',如何解决这个问题,谁能帮帮我。
提前致谢。
【问题讨论】:
-
我希望您的查询字符串连接不会让您对 SQL 注入开放
标签: mysql hibernate grails groovy grails-orm