Changeset 453 for trunk/grails-app/conf
- Timestamp:
- May 20, 2010, 5:02:22 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/BootStrap.groovy
r442 r453 104 104 ).save(); 105 105 106 // Create 30 roles to test pagination107 def roleCounter = 1;108 30.times { new PersonRole( name: "Rol #${roleCounter++}" ).save() }109 110 106 // Create persons 111 107 def person1 = new Person( … … 138 134 30.times { new Person( firstName: "Person #${personCounter}", lastName: "Testperson", email: "email${personCounter++}@testdomain.com" ).save() } 139 135 140 // Create templates 136 // Create a few publications 137 println ".adding publications" 138 def publication1 = new Publication( 139 title: "Postnatal development of hypothalamic leptin receptors", 140 authorsList: "Cottrell EC, Mercer JG, Ozanne SE.", 141 pubMedID: "20472140", 142 comments: "Not published yet", 143 DOI: "unknown" 144 ) 145 .save(); 146 147 def publication2 = new Publication( 148 title: "Induction of regulatory T cells decreases adipose inflammation and alleviates insulin resistance in ob/ob mice", 149 authorsList: "Ilan Y, Maron R, Tukpah AM, Maioli TU, Murugaiyan G, Yang K, Wu HY, Weiner HL.", 150 pubMedID: "20445103", 151 comments: "", 152 DOI: "" 153 ) 154 .save(); 155 156 // Create templates 141 157 142 158 def genderField = new TemplateField( … … 554 570 .addToEventGroups(HFBL4) 555 571 556 // Add persons to study572 // Add persons and publications to study 557 573 def studyperson1 = new StudyPerson( person: person1, role: role1 ).save(); 558 574 def studyperson2 = new StudyPerson( person: person2, role: role2 ).save(); … … 561 577 .addToPersons( studyperson1 ) 562 578 .addToPersons( studyperson2 ) 579 .addToPublications( publication1 ) 580 .addToPublications( publication2 ) 563 581 .save() 564 582 … … 624 642 humanStudy.addToSamplingEvents(bloodSamplingEvent) 625 643 humanStudy.addToEventGroups rootGroup 626 humanStudy.save() 644 645 646 // Add persons to study 647 def studyperson3 = new StudyPerson( person: person1, role: role2 ).save(); 648 649 humanStudy 650 .addToPersons( studyperson3 ) 651 .addToPublications( publication2 ) 652 .save() 627 653 628 654 /* … … 697 723 humanStudy.addToAssays(lipidAssayRef); 698 724 humanStudy.save() 699 725 726 mouseStudy.addToAssays(lipidAssayRef); 727 mouseStudy.save() 728 700 729 } 701 730 }
Note: See TracChangeset
for help on using the changeset viewer.