Fix been lazy loading issue.

This commit is contained in:
Paulo Gustavo Veiga 2023-11-19 20:22:05 -08:00
parent 63975464ca
commit 884a93478b
3 changed files with 2 additions and 3 deletions

View File

@ -58,6 +58,7 @@ public class MvcMindmapController {
final MindMapBean mindmap = findMindmapBean(id); final MindMapBean mindmap = findMindmapBean(id);
model.addAttribute("principal", Utils.getUser()); model.addAttribute("principal", Utils.getUser());
model.addAttribute("mindmap", mindmap); model.addAttribute("mindmap", mindmap);
model.addAttribute("mapFullName", mindmap.getCreator().getFullName());
final Locale locale = LocaleContextHolder.getLocale(); final Locale locale = LocaleContextHolder.getLocale();
model.addAttribute("locale", locale.toString().toLowerCase()); model.addAttribute("locale", locale.toString().toLowerCase());
return "mindmapViewonly"; return "mindmapViewonly";

View File

@ -26,8 +26,6 @@
<prop key="hibernate.default_batch_fetch_size">200</prop> <prop key="hibernate.default_batch_fetch_size">200</prop>
<prop key="hibernate.nestedTransactionAllowed">true</prop> <prop key="hibernate.nestedTransactionAllowed">true</prop>
<prop key="hibernate.auto_quote_keyword">true</prop> <prop key="hibernate.auto_quote_keyword">true</prop>
<prop key="hibernate.enable_lazy_load_no_trans">true</prop>
</props> </props>
</property> </property>
</bean> </bean>

View File

@ -71,7 +71,7 @@
</a> </a>
<div id="mapDetails"> <div id="mapDetails">
<span class="title"><spring:message code="CREATOR"/>:</span><span>${mindmap.creator.fullName}</span> <span class="title"><spring:message code="CREATOR"/>:</span><span>${mapFullName}</span>
<span class="title"><spring:message code="DESCRIPTION"/>:</span><span>${mindmap.title}</span> <span class="title"><spring:message code="DESCRIPTION"/>:</span><span>${mindmap.title}</span>
</div> </div>