アットウィキロゴ

Grails

FrontPage

気になる単語

find or criteriaでクエリをキャッシュしない

def person = Person.findByFirstName("Fred", cache:false)<

def people = Person.withCriteria { like('firstName', 'Fr%') cache false }

plugin作成

http://d.hatena.ne.jp/fits/20080703/1215107047

ApllicationContextを取得

  • service・controller・domain内でなら以下 def grailsApplicationを宣言 →DIされる grailsAppliction.getMainContext()で取得

UnitTest

機能いろいろ

methodを動的に呼び出す

  • this.invokeMethod(methodName, args)
  • this."${methodName}" args

groovyのinterface実装方法

http://groovy.codehaus.org/Groovy+way+to+implement+interfaces

ResultTransformer

*constrantsのデフォルト設定

http://www.slideshare.net/tyama/g-in-grails

GrailsでHibernateのログを出力する

pre> Q: How can I turn on logging for hibernate in order to see SQL statements, input parameters and output results?

Edit your Config.groovy file. Find the line with:

hibernate = "off"

and replace it with:

hibernate.SQL="trace,stdout"

 hibernate.type="trace,stdout"

now you will see SQL logging statements appear on the console.

/pre?

最終更新:2011年05月28日 23:46
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。