Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.2-M4
-
Component/s: Persistence
-
Labels:None
-
Patch Submitted:Yes
-
Testcase included:yes
Description
DomainClass.exists() checks if the return of get() is not null. This is more expensive than it needs to be since eagerly loaded collections and large strings will be unnecessarily loaded. A query that counts by id is a lot cheaper. I've implemented this and will submit a pull request shortly.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
This was fixed along with
GRAILS-5257: http://github.com/grails/grails/commit/acc9d1a733bfdbc19ccd1ea5dac2fc047b081e2dGRAILS-5257: http://github.com/grails/grails/commit/acc9d1a733bfdbc19ccd1ea5dac2fc047b081e2d