List of usage examples for org.hibernate Hibernate unproxy
public static Object unproxy(Object proxy)
From source file:org.jbb.board.impl.forum.DefaultBoardService.java
License:Apache License
@Override @Transactional(readOnly = true)/*from w ww . j a v a2 s. co m*/ @CacheResult(cacheName = ForumCaches.BOARD_STRUCTURE) public List<ForumCategory> getForumCategories() { List<ForumCategory> categories = categoryRepository.findAllByOrderByPositionAsc().stream() .map(entity -> (ForumCategory) Hibernate.unproxy(entity)).collect(Collectors.toList()); categories.forEach(ForumCategory::getForums); return categories; }