diff --git a/hsarback/src/de/hsadmin/mods/pac/BasePac.java b/hsarback/src/de/hsadmin/mods/pac/BasePac.java index 8a1ded1..457c6e3 100644 --- a/hsarback/src/de/hsadmin/mods/pac/BasePac.java +++ b/hsarback/src/de/hsadmin/mods/pac/BasePac.java @@ -12,8 +12,6 @@ import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; import javax.persistence.OneToMany; import javax.persistence.SequenceGenerator; import javax.persistence.Table; @@ -49,14 +47,9 @@ public class BasePac implements Serializable { @Column(name = "valid", columnDefinition = "boolean") private boolean valid; - @OneToMany(fetch = FetchType.LAZY, cascade = ALL) - @JoinTable(name = "component", joinColumns = @JoinColumn(name = "basepacket_id"), inverseJoinColumns = @JoinColumn(name = "basecomponent_id")) + @OneToMany(fetch = FetchType.LAZY, cascade=ALL, mappedBy="basePac") private Set components; - @OneToMany(fetch = FetchType.LAZY, cascade = ALL) - @JoinTable(name = "packet_component", joinColumns = @JoinColumn(name = "packet_id"), inverseJoinColumns = @JoinColumn(name = "basepacket_id")) - private Set pacs; - public long id() { return basePacId; } @@ -125,14 +118,6 @@ public class BasePac implements Serializable { getComponents().remove(comp); } - public Set getPacs() { - return pacs; - } - - public void setPacs(Set pacs) { - this.pacs = pacs; - } - // generic public boolean equals(Object aOther) { if (aOther == null || aOther.getClass() != getClass())