- Timestamp:
- Jan 26, 2011, 5:08:25 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/nl/tno/metagenomics/AssaySample.groovy
r4 r7 17 17 String tagSequence // Tag originally used to identify the sample 18 18 19 static belongsTo = [ assay: Assay, sample: Sample ]19 static belongsTo = [ assay: Assay, sample: Sample, run: Run ] 20 20 static hasMany = [ sequenceData: SequenceData ] 21 21 … … 24 24 oligoNumber(nullable: true) 25 25 tagSequence(nullable: true) 26 run(nullable: true); 26 27 } 27 28 … … 30 31 numSequences index:'numsequences_idx' 31 32 } 33 sequenceData cascade: "all-delete-orphan" 32 34 } 33 35 … … 162 164 otherAssaySample.tagSequence = tagSequence; 163 165 otherAssaySample.oligoNumber = oligoNumber; 166 otherAssaySample.run = run; 164 167 165 168 // Move attached data … … 169 172 if( dataList && dataList.size() > 0 ) { 170 173 for( def j = dataList.size() - 1; j >= 0; j-- ) { 171 // Check whether the run of this sequenceData object is also connected to the assay172 def run = dataList[j].run;173 174 if( !otherAssay.runs || !otherAssay.runs.contains( run ) ) {175 otherAssay.addToRuns( run );176 }177 178 174 // Copy data 179 175 dataList[j].sample = otherAssaySample;
Note: See TracChangeset
for help on using the changeset viewer.