Ignore:
Timestamp:
Nov 2, 2009, 3:25:26 PM (15 years ago)
Author:
gav
Message:

Resolve ticket #12 again.
Turn query cache on again since this did not resolve the problem.
Implement fix as per http://jira.codehaus.org/browse/GRAILS-5111, add flush:true to save.
Adjust templates to include above and remove home url.
Re-generate all non detailed views and controllers.
Manually add flush:true and remove home url to detailed views and controllers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/ComponentItemController.groovy

    r118 r178  
    2727        if(componentItemInstance) {
    2828            try {
    29                 componentItemInstance.delete()
     29                componentItemInstance.delete(flush:true)
    3030                flash.message = "ComponentItem ${params.id} deleted"
    3131                redirect(action:list)
     
    6767            }
    6868            componentItemInstance.properties = params
    69             if(!componentItemInstance.hasErrors() && componentItemInstance.save()) {
     69            if(!componentItemInstance.hasErrors() && componentItemInstance.save(flush: true)) {
    7070                flash.message = "ComponentItem ${params.id} updated"
    7171                redirect(action:show,id:componentItemInstance.id)
     
    7777        else {
    7878            flash.message = "ComponentItem not found with id ${params.id}"
    79             redirect(action:edit,id:params.id)
     79            redirect(action:list)
    8080        }
    8181    }
     
    8989    def save = {
    9090        def componentItemInstance = new ComponentItem(params)
    91         if(!componentItemInstance.hasErrors() && componentItemInstance.save()) {
     91        if(!componentItemInstance.hasErrors() && componentItemInstance.save(flush: true)) {
    9292            flash.message = "ComponentItem ${componentItemInstance.id} created"
    9393            redirect(action:show,id:componentItemInstance.id)
Note: See TracChangeset for help on using the changeset viewer.