I know this is an old question but for future reference I think the appropriate answer would be this:
Given the OP's original question
Is there a way to check if an instance is still persisted in the data base or has the unsaved state?
Yes, there is. Call the exists() method of the domain class of your instance.
Suppose we have a Test domain class and a test object instance:
def bPersists = ( test.id != null && Test.exists(test.id) ); // Check test.id for null because a id of zero is a valid index, also the id might not be an integer.
Notice the check if test.id equals to null instead of just checking if it evaluates to true. That is because an id equal to zero would evaluate to false but it is actually a valid id number. Also the id could be a string or other data type.