0

Let's say I have a fixture defined a:

def fixture = fixtureLoader.load { 
    book( Book, name: "XYZ")
}

I want to do something like:

fixture.purge()

Is it possible? If so, how?

Alexander Suraphel
  • 10,103
  • 10
  • 55
  • 90
  • If this fixture is a class field You can purge it in `cleanup` method. – Opal Nov 24 '14 at 08:06
  • @Opal will it cleanup(remove from DB) the data created inside it? – Alexander Suraphel Nov 24 '14 at 08:07
  • Not sure about it, this is the place when such methods should be invoked. Don't know how it works exactly, because I'm not a grails dev. However I guess that You can invoke a kind of `flush` method after `purge` to save the state to DB. – Opal Nov 24 '14 at 08:15

0 Answers0