Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
2.5.2.RELEASE
-
None
Description
Domain class:
class Album { String title }
controller code:
...
Album.findByTitle('abc')
...
Refactor rename of Album title to something else should be able to change dynamic finder. Change title to 'foobar', dynamic finder becomes findByFoobar.
There are probably similar problems if using this mechanism:
Album.find(new Album(title:'abc'))
The 'title:' is not renamed.
Or this mechanism:
def c = Album.createCriteria() def results = c { like("title", "Wibble%") }
Or this mechanism:
def results =
Album.findAll("from Album as a where a.title like 'The Joshua Tree'")