Changeset 278


Ignore:
Timestamp:
Mar 17, 2010, 2:29:09 PM (13 years ago)
Author:
duh
Message:
  • fixed study wizard saving
Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/DataSource.groovy

    r277 r278  
    3434                                        dbCreate = "create-drop" // one of 'create', 'create-drop','update'
    3535                                        url = "jdbc:hsqldb:mem:devDB"
    36                                         loggingSql = true
     36                                        //loggingSql = true
    3737                                        break;
    3838                        }
  • trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy

    r275 r278  
    448448                                        // save EventDescriptions
    449449                                        flow.eventDescriptions.each() {
    450                                                 if (!it.validate() || !it.save()) {
     450                                                if (!it.save(flush:true)) {
    451451                                                        this.appendErrors(it, flash.errors)
    452452                                                        throw new Exception('error saving eventDescription')
     
    457457                                        // save events
    458458                                        flow.events.each() {
    459                                                 if (!it.validate() || !it.save()) {
     459                                                if (!it.save(flush:true)) {
    460460                                                        this.appendErrors(it, flash.errors)
    461461                                                        throw new Exception('error saving event')
     
    473473                                        // save eventGroups
    474474                                        flow.eventGroups.each() {
    475                                                 if (!it.validate() || !it.save()) {
     475                                                if (!it.save(flush:true)) {
    476476                                                        this.appendErrors(it, flash.errors)
    477477                                                        throw new Exception('error saving eventGroup')
     
    485485                                        // save subjects
    486486                                        flow.subjects.each() {
    487                                                 if (!it.validate() || !it.save()) {
     487                                                if (!it.save(flush:true)) {
    488488                                                        this.appendErrors(it, flash.errors)
    489489                                                        throw new Exception('error saving subject')
     
    496496
    497497                                        // save study
    498                                         if (!flow.study.validate() || !flow.study.save()) {
     498                                        if (!flow.study.save(flush:true)) {
    499499                                                this.appendErrors(flow.study, flash.errors)
    500500                                                throw new Exception('error saving study')
Note: See TracChangeset for help on using the changeset viewer.