【发布时间】:2012-12-09 17:12:50
【问题描述】:
我想遍历这个类并显示在一个表格中。显示图像的最简单方法是什么?
class Crop {
static hasMany = [diseases: Disease]
int id
String commonName
String scientificName
byte[] image
}
static mapping = {
table: 'Crops'
commonName length : 100
scientificName length: 100
image sqlType: "longblob"
}
【问题讨论】:
-
通常你会为每个由控制器处理的图像做一个额外的请求。您真的必须在 gsp 中执行此操作吗?也许您应该先接受您之前提出的一些问题?
标签: grails grails-orm