0
我想知道是否必须设置flush:true当我在我的域类中的数据库上进行操作时。例如:更新域类和刷新会话?
class TreeNode {
TreeNode removeFromChildren(TreeNode child) {
TreeNodeChild.findByNodeAndChild(this, child).delete(flush: true)
this
}
...
}
或者是以下正确的符号?
class TreeNode {
TreeNode removeFromChildren(TreeNode child) {
TreeNodeChild.findByNodeAndChild(this, child).delete()
this
}
...
}
问题是:我应该刷新会话吗?