class Author {
String name
ArrayList<Book> books = []
static hasMany = [books: Book]
static mapping = {
books cascade: "all-delete-orphan"
}
}
当我尝试保存对象时发生错误。“java.io.NotSerializableException”。有任何想法吗?我需要在课堂上实现 Serializable 吗?如果是这样,为什么?