开发者

Use grails export plugin for multiple classes

The grails export plugin is designed to export a single domain class. Is there a way to use the Grails export plugin to export a hierarchy of hasMany domain classes. Could I do a join that creates a transient class or command object class.

For instance:

class Author {
  Stri开发者_如何学编程ng name
  static hasMany = [books:Book]
}
class Book {
  String name
  static hasMany = [chapters:Chapter]
}
class Chapter {
  String name
  Integer pages
}

To create an export with each row having:

Author name, Book name, Chapter Name, pages


I successfully used the expanded record approach described here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜