If I make a domain object in a controller and don't call .save()
, Grails will do it for me automatically at some point. I am creating lots of domain objects without planning to save all of them and getting 'references an unsaved transient instance' exceptions when my service exits.
How would I get a list of all objects that Grails will try to save when the controller/service exits so that I could prevent some of them from being saved?