开发者

Hibernate cascade debug options

I have run into various StackOverflowErrors which occur during cascading. These have been 开发者_如何学Cextremely time consuming in debugging because I don't know which properties are being cascaded to cause this recursive behavior. Does anyone know of a log setting or some other form of debugging which could tell me specifically what properties are being cascaded?


In the "log4j.properties" file set the "log4j.logger.org.hibernate" property to "trace":

"log4j.logger.org.hibernate=trace"

This provides TRACE output for Hibernate Cascade.cascade() calls.


It's Depending on the way you have defined the hibernate mapping.

  • If you've defined the mapping via xxx.hbm.xml, then, in the

  • If you've defined the mapping via Java Annotation, you should check the location of your @Cascade annotation and on which field you have this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜