Changeset 1169


Ignore:
Timestamp:
Nov 18, 2010, 2:16:29 PM (10 years ago)
Author:
business@…
Message:

fix for #128 - parentEvent is now nullable

File:
1 edited

Legend:

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

    r1161 r1169  
    1616        //static searchable = { [only: ['name']] }
    1717
    18         // A Sample always belongs to one study.
    1918        static belongsTo = [
     19                // A Sample always belongs to one study.
    2020                parent                  : Study,
     21
     22                // A Sample optionally has a parent Subject from which it was taken, this Subject should be in the same parent study.
    2123                parentSubject   : Subject,
     24
     25                // Also, it has a parent SamplingEvent describing the actual sampling, also within the same parent study.
    2226                parentEvent             : SamplingEvent,
     27
     28                // And it has a parent EventGroup which tied it to its parent subject and parent event
    2329                parentEventGroup: EventGroup
     30
     31                // We can't have parentAssay since a Sample can belong to multiple Assays
    2432        ]
    25 
    26         // A Sample optionally has a parent Subject from which it was taken, this Subject should be in the same parent study.
    27         //long parentSubject
    28 
    29         // Also, it has a parent SamplingEvent describing the actual sampling, also within the same parent study.
    30         // Strange enough, we need to define parentEvent as a long here, otherwise the SamplingEvent gets serialized into the database (?!!)
    31         //long parentEvent
    3233
    3334        String name             // should be unique with respect to the parent study (which can be inferred)
     
    6061
    6162                // The same holds for parentEvent
    62                 parentEvent(nullable:false)
     63                parentEvent(nullable:true)
    6364
    6465                // and for parentEventGroup
    6566                parentEventGroup(nullable:true)
    66                
     67
    6768                // The material domain field is optional
    6869                material(nullable: true)
Note: See TracChangeset for help on using the changeset viewer.