Changeset 817


Ignore:
Timestamp:
Aug 17, 2010, 2:42:54 PM (8 years ago)
Author:
keesvb
Message:

fixed deleting of event groups, they now also cascade to samples in the event group

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/Study.groovy

    r813 r817  
    318318                                        msg += ", sample '${it.name}' was deleted"
    319319                                        this.removeFromSamples( it )
     320                                        // Also here, contrary to documentation, an extra delete() is needed
     321                                        it.delete()
    320322                                }
    321323                        }
     
    342344                println ".remove eventGroup '${eventGroup.name}' from study '${this.title}'"
    343345                this.removeFromEventGroups(eventGroup)
     346                // Also here, contrary to documentation, an extra delete() is needed
     347                eventGroup.delete()
    344348
    345349                return msg
  • trunk/test/integration/gscf/SampleTests.groovy

    r812 r817  
    6060                )
    6161
    62                 if (!samplingEvent.validate()) {
    63                         samplingEvent.errors.each { println it}
    64                 }
    6562                // The SamplingEvent should not validate at this point because it doesn't have a parent study
    6663                assert !samplingEvent.validate()
     
    223220                )
    224221                study.addToEventGroups(group)
     222                assert group.validate()
     223
     224
    225225                group.addToSubjects(subject)
    226226                group.addToSamplingEvents(event)
Note: See TracChangeset for help on using the changeset viewer.