mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
remove many to many relationship between entries and feeds
This commit is contained in:
@@ -9,6 +9,7 @@ import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
@@ -32,8 +33,8 @@ public class FeedEntry extends AbstractModel {
|
||||
@Column(length = 40, nullable = false)
|
||||
private String guidHash;
|
||||
|
||||
@OneToMany(mappedBy = "entry", cascade = CascadeType.REMOVE)
|
||||
private Set<FeedFeedEntry> feedRelationships;
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
private Feed feed;
|
||||
|
||||
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, optional = false)
|
||||
@JoinColumn(nullable = false, updatable = false)
|
||||
@@ -124,12 +125,12 @@ public class FeedEntry extends AbstractModel {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public Set<FeedFeedEntry> getFeedRelationships() {
|
||||
return feedRelationships;
|
||||
public Feed getFeed() {
|
||||
return feed;
|
||||
}
|
||||
|
||||
public void setFeedRelationships(Set<FeedFeedEntry> feedRelationships) {
|
||||
this.feedRelationships = feedRelationships;
|
||||
public void setFeed(Feed feed) {
|
||||
this.feed = feed;
|
||||
}
|
||||
|
||||
public FeedSubscription getSubscription() {
|
||||
|
||||
Reference in New Issue
Block a user