package by.bsuir.mpp.computershop.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "provider")
public class Provider extends BaseSoftEntity<Long> {

    @Column(name = "name", unique = true, nullable = false)
    private String name;

    @Column(name = "description", columnDefinition = "text")
    private String description;

    @Column(name = "imports_count", nullable = false,
            insertable = false, updatable = false)
    private Integer importsCount;

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getImportsCount() {
        return importsCount;
    }

    public void setImportsCount(Integer importsCount) {
        this.importsCount = importsCount;
    }

}

@@ -127,21 +127,80 @@
 istence.
-Table
+OneToMany;%0Aimport javax.persistence.Table;%0Aimport java.util.List
 ;%0A%0A@Enti
@@ -602,16 +602,89 @@
 Count;%0A%0A
+    @OneToMany(mappedBy = %22provider%22)%0A    private List%3CImport%3E imports;%0A%0A
     publ
@@ -1162,10 +1162,169 @@
 %0A    %7D%0A%0A
+    public List%3CImport%3E getImports() %7B%0A        return imports;%0A    %7D%0A%0A    public void setImports(List%3CImport%3E imports) %7B%0A        this.imports = imports;%0A    %7D%0A
 %7D%0A

Update Provider Entity