From 1ba497e953ca7079b37b7be19a87b6cd397fdd92 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@jalin.de>
Date: Thu, 02 May 2013 17:10:45 +0200
Subject: [PATCH] mapping of basepac corrected

---
 hsarback/src/de/hsadmin/mods/pac/BasePac.java |   17 +----------------
 1 files changed, 1 insertions(+), 16 deletions(-)

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.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,13 +47,8 @@
 	@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<Component> components;
-
-	@OneToMany(fetch = FetchType.LAZY, cascade = ALL)
-	@JoinTable(name = "packet_component", joinColumns = @JoinColumn(name = "packet_id"), inverseJoinColumns = @JoinColumn(name = "basepacket_id"))
-	private Set<Pac> pacs;
 
 	public long id() {
 		return basePacId;
@@ -123,14 +116,6 @@
 
 	public void removeComponent(Component comp) {
 		getComponents().remove(comp);
-	}
-
-	public Set<Pac> getPacs() {
-		return pacs;
-	}
-
-	public void setPacs(Set<Pac> pacs) {
-		this.pacs = pacs;
 	}
 
 	// generic

--
Gitblit v1.9.0-SNAPSHOT