Changeset 271
- Timestamp:
- Mar 16, 2010, 9:21:46 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/dbnp/data/Term.groovy
r267 r271 29 29 // Covenenice method for delivering Terms. 30 30 // if the term is already defined, use it. 31 // otherwise, create it .31 // otherwise, create it and return it. 32 32 // should be removed when ontologies work. 33 33 static getTerm( string ) { … … 37 37 term.ontology = Ontology.find('from Ontology as o') 38 38 term.accession = '' 39 println string 40 if( term.save(flush:true) ) { println "okay, saved" } 41 else { 39 if( !term.save(flush:true) ) { 42 40 term.errors.each{ println it } 43 println "not okay, not saved"}41 } 44 42 } 45 43 return term
Note: See TracChangeset
for help on using the changeset viewer.