This commit is contained in:
Athou
2013-03-22 23:15:20 +01:00
parent 8b1022a4e1
commit 9326190a1f
2 changed files with 4 additions and 2 deletions

View File

@@ -62,8 +62,8 @@ public class FeedEntriesREST extends JSONPage {
entries.getEntries().addAll(buildEntries(subscription));
} else {
FeedCategory feedCategory = feedCategoryService.findById("all"
.equals(id) ? null : Long.valueOf(id));
FeedCategory feedCategory = "all".equals(id) ? null
: feedCategoryService.findById(Long.valueOf(id));
Collection<FeedSubscription> subscriptions = "all".equals(id) ? feedSubscriptionService
.findAll(getUser()) : feedSubscriptionService
.findWithCategory(getUser(), feedCategory);

View File

@@ -2,6 +2,7 @@ package com.commafeed.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
@@ -23,6 +24,7 @@ public class UserSettings implements Serializable {
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column(name = "user_id")
private User user;
@Enumerated(EnumType.STRING)