我正在试验春季宠物诊所的应用程序,它的完整代码是at this link。我想设置hibernate.max_fetch_depth=0
,但似乎无法让我的设置在我重新启动tomcat服务器并从eclipse重新启动应用程序时生效。设置hibernate.max_fetch_depth在春天petclinic
这是a link to the directory that contains all the config files。 我应该在哪个配置文件中放置hibernate.max_fetch_depth=0
设置,以及我应该使用什么确切的语法?
我试着在business-config.xml
把这样的:
<property name="jpaProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">create-drop</prop>
<prop key="hibernate.max_fetch_depth">0</prop>
</props>
</property>
我也试图把这个在data-access.properties
:
hibernate.max_fetch_depth=0
但无论是做法似乎工作。
你有没有设法找到它为什么不起作用? – 2014-11-17 20:45:06
过度的继承导致了这个问题。你在回答根本问题时已经说明了这一点。我最终将模式的一部分展平以减少包含在连接中的表的数量。感谢您的跟进。 – CodeMed 2014-11-17 23:20:13
我有另一个休眠问题。你愿意帮助我吗?这里是链接:http://stackoverflow.com/questions/29640195/unidirectional-many-to-one-relationship-with-inheritance – CodeMed 2015-04-15 01:52:00