remove many to many relationship between entries and feeds

This commit is contained in:
Athou
2013-07-24 15:39:20 +02:00
parent fdacac74cc
commit c2b53b117c
18 changed files with 350 additions and 251 deletions

View File

@@ -4,6 +4,7 @@ import java.util.Date;
import java.util.Set;
import javax.persistence.Cacheable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
@@ -107,8 +108,8 @@ public class Feed extends AbstractModel {
@Column(length = 40)
private String lastContentHash;
@OneToMany(mappedBy = "feed")
private Set<FeedFeedEntry> entryRelationships;
@OneToMany(mappedBy = "feed", cascade = CascadeType.REMOVE)
private Set<FeedEntry> entries;
@OneToMany(mappedBy = "feed")
private Set<FeedSubscription> subscriptions;
@@ -325,12 +326,12 @@ public class Feed extends AbstractModel {
this.normalizedUrlHash = normalizedUrlHash;
}
public Set<FeedFeedEntry> getEntryRelationships() {
return entryRelationships;
public Set<FeedEntry> getEntries() {
return entries;
}
public void setEntryRelationships(Set<FeedFeedEntry> entryRelationships) {
this.entryRelationships = entryRelationships;
public void setEntries(Set<FeedEntry> entries) {
this.entries = entries;
}
}