Grails 复杂查询及分页排序
如何配置输出hibernate SQL statement
有几种方法:
1. Modify conf\Config.groovy
Change hibernate="off" to on
但是这种方式输出的Hibernate信息比较多。
2. Modify DataSource.groovy
Add logSql = true
But didn't work now for Grails 1.0 RC4
3. Modify GRAILS_HOME\scripts\log4j.properties, add
log4j.logger.org.hibernate.SQL=DEBUG
这是目前最佳的方法
见http://hi.baidu.com/jacksonchenjp/blog/item/0fef184f9e2bac32aec3ab08.html
http://www.javaeye.com/topic/52774
http://www.javaeye.com/topic/149489
http://www.javaeye.com/topic/250349
http://garyli.javaeye.com/blog/237100
http://seanwon.javaeye.com/blog/315677
http://bloodwolf-china.javaeye.com/blog/264035
http://bloodwolf-china.javaeye.com/blog/644420
http://stackoverflow.com/questions/2124157/acl-on-field-level-in-grails
Basic Tomcat clustering for Grails applications