use a onetomany relationship for push info to avoid hibernate automatic lazy loading of onetoone optional relationships

This commit is contained in:
Athou
2013-05-30 10:24:30 +02:00
parent 84a8566af4
commit 0aee6850d5
6 changed files with 16 additions and 13 deletions

View File

@@ -29,6 +29,7 @@ import com.commafeed.backend.model.FeedSubscription;
import com.commafeed.backend.pubsubhubbub.SubscriptionHandler;
import com.commafeed.backend.services.ApplicationSettingsService;
import com.commafeed.backend.services.FeedUpdateService;
import com.google.common.collect.Iterables;
import com.google.common.util.concurrent.Striped;
@Singleton
@@ -157,7 +158,7 @@ public class FeedRefreshUpdater {
}
private void handlePubSub(final Feed feed) {
FeedPushInfo info = feed.getPushInfo();
FeedPushInfo info = Iterables.getFirst(feed.getPushInfo(), null);
if (info != null && info.isActive() == false) {
new Thread() {
@Override