So we have unique 'codes' for some of our grails objects (ref data), and when we want to retrieve them, we do so by calling them with their static code:
Currency.findByCode(Currency.DOLLAR)
Perhaps I'm completely wrong, but this seems like a very verbose and non-groovy way of retrieving objects (especially when you have to do it multiple times, for multiple objects).
Is there a more accepted approach (maybe having a reference to the object itself somewhere)? If this is the best way to do it, that is an acceptable answer. Thanks.