Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.0 final
-
Fix Version/s: 2.0.1
-
Component/s: Controllers
-
Labels:
-
Environment:Linux
Description
When trying to execute a "where" query inside a closure styled action in a controller, the result returned consists of all the records in the database for that domain instead of the filtered records. Run the attached sample application and hit the given URL's:
http://localhost:8080/test/address/useClosureStyleAction - Results in an assertion failure
http://localhost:8080/test/address/useMethodStyleAction - Executes without any problem
The action bodies, however, for both the actions are the same as given below:
def addresses = Address.where {city == "Noida"}.list()
assert addresses*.city == ["Noida", "Noida"]
render addresses*.city
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
Fixed by https://github.com/SpringSource/grails-data-mapping/commit/d241464fbbd49455504bc9ed125a314f41e38a06