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

@@ -67,7 +67,7 @@ public class FeedDAO extends GenericDAO<Feed> {
List<Feed> feeds = q.getResultList();
for (Feed feed : feeds) {
FeedPushInfo info = feed.getPushInfo();
FeedPushInfo info = Iterables.getFirst(feed.getPushInfo(), null);
if (info != null) {
info.getTopic();
}