package com.helium.model;

import com.github.jasminb.jsonapi.annotations.Relationship;
import com.github.jasminb.jsonapi.annotations.Type;

import java.util.List;


@Type("label")
public class Label extends Resource {

    @Relationship("sensor")
    private List<Sensor> labelSensors;

    public static Label newLabel(String name) {
        Label label = new Label();
        label.setName(name);
        return label;
    }

    @Override
    public String toString() {
        return "Label{" +
                "labelSensors=" + labelSensors +
                "} " + super.toString();
    }

}

@@ -280,16 +280,87 @@
 nsors;%0A%0A
+    @Relationship(%22element%22)%0A    private List%3CElement%3E labelElements;%0A%0A
     publ
@@ -612,16 +612,69 @@
 nsors +%0A
+                %22, labelElements=%22 + labelElements +%0A
         
@@ -712,11 +712,10 @@
 ;%0A    %7D%0A
-%0A
 %7D%0A

Add Elements to Label model