I have the following classes: SAMPLE_TYPE and SAMPLE_PARAMETER. Each sample can have many parameters. In my bootstrap I have created a parameter and the sample:
def r = new SampleParameter(name: "Color", value:"Red").save(failOnError: true)
def b = new SampleType(sampleName: "Blood")
.addToSampleType(r)
.save(failOnError: true)
I keep getting an error ‘no signature of method com.SampleType.addToSampleType() is applicable for argument types
I just want to add a parameter to a sample
At first glance it looks to me like you’re trying to add a SampleParameter (variable named r) as a SampleType. Maybe the method should be
.addToSampleParameter(r)? If that’s not the case can you please post a copy of your domian classes?