與 addTo 方法相反,它會從關聯中移除執行個體。
def author = Author.findByName("Stephen King") def book = author.books.find { it.title == 'The Stand' } author.removeFromBooks(book)