I have this domain class that has a one-to-many relationship as with dynamic scaffolding show below:
Domain:
package mienapp
class Announcements {
String user
String title
String comments
Date dateCreated
static hasMany = [tag: Tags]
static mapping = {
comments sqlType: 'text'
}
static constraints = {
}
}
Controller:
package mienapp
class AnnouncementsController {
def scaffold = true
def index() {
redirect(action: list)
}
}
When controller redirects to list, the table shows all fields defined in announcements class. How can I show the value of field from tags in the table as well?