Details
Description
When using inside my unit test something like for setting up my mock domain instances:
persons = [ new Person(name:'Graeme'), ... ]
mockDomain(Person, persons)
and then in my service class for example, I am using findWhere lookup
Person.findWhere(name: 'Graeme')
it does not return any results, although the persons list does contain a proper object.
Workaround is in this case to use a findByName dynamic finder.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
Burt Beckwith
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Graeme Rocher [ graemerocher ] | Burt Beckwith [ burtbeckwith ] |
Burt Beckwith
made changes -
| Status | Open [ 1 ] | In Progress [ 3 ] |
Burt Beckwith
made changes -
| Status | In Progress [ 3 ] | Open [ 1 ] |
Contegix Support
made changes -
| Project Import | Thu Mar 24 21:22:24 CDT 2011 [ 1301019744151 ] |
Graeme Rocher
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Resolution | Fixed [ 1 ] | |
| Fix Version/s | 1.4-M1 [ 11040 ] |
Burt Beckwith
made changes -
| Workflow | jira [ 33998 ] | Grails [ 46415 ] |
Burt Beckwith
made changes -
| Workflow | Grails [ 46415 ] | Copy of Grails [ 53871 ] |
Burt Beckwith
made changes -
| Workflow | Copy of Grails [ 53871 ] | Grails [ 61281 ] |
Burt Beckwith
made changes -
| Workflow | Grails [ 61281 ] | Grails2 [ 68860 ] |
Burt Beckwith
made changes -
| Workflow | Grails2 [ 68860 ] | jira [ 76249 ] |
Burt Beckwith
made changes -
| Workflow | jira [ 76249 ] | Grails2 [ 84928 ] |
Peter Ledbrook
made changes -
| Workflow | Grails2 [ 84928 ] | jira [ 93349 ] |
Peter Ledbrook
made changes -
| Workflow | jira [ 93349 ] | Grails2 [ 101515 ] |