title: Grails: Check if a domain model object was created in code or loaded from the database
body: <p>In Grails (or maybe Hibernate) is it possible to check if a domain model object was created in code (ie: it's a new object that has not yet been saved to the database) or if it was created by being loaded from the database?</p>