Show
Ignore:
Timestamp:
11/02/09 15:25:26 (5 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.

Files:
1 modified

Legend:

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

    r122 r178  
    2727        if(maintenancePolicyInstance) { 
    2828            try { 
    29                 maintenancePolicyInstance.delete() 
     29                maintenancePolicyInstance.delete(flush:true) 
    3030                flash.message = "MaintenancePolicy ${params.id} deleted" 
    3131                redirect(action:list) 
     
    6767            } 
    6868            maintenancePolicyInstance.properties = params 
    69             if(!maintenancePolicyInstance.hasErrors() && maintenancePolicyInstance.save()) { 
     69            if(!maintenancePolicyInstance.hasErrors() && maintenancePolicyInstance.save(flush: true)) { 
    7070                flash.message = "MaintenancePolicy ${params.id} updated" 
    7171                redirect(action:show,id:maintenancePolicyInstance.id) 
     
    7777        else { 
    7878            flash.message = "MaintenancePolicy not found with id ${params.id}" 
    79             redirect(action:edit,id:params.id) 
     79            redirect(action:list) 
    8080        } 
    8181    } 
     
    8989    def save = { 
    9090        def maintenancePolicyInstance = new MaintenancePolicy(params) 
    91         if(!maintenancePolicyInstance.hasErrors() && maintenancePolicyInstance.save()) { 
     91        if(!maintenancePolicyInstance.hasErrors() && maintenancePolicyInstance.save(flush: true)) { 
    9292            flash.message = "MaintenancePolicy ${maintenancePolicyInstance.id} created" 
    9393            redirect(action:show,id:maintenancePolicyInstance.id)