The static mapping block is the easiest way to accomplish this task because it is the most Grails-like.
静态的 mapping块是完成这个任务的最简单的方式,因为它与 Grails 最相似。
You can create a StateCode lookup relationship to establish a static mapping between the state full names and codes.
您可以创建StateCode查询关系,以建立州全名和代码之间的静态映射。
The first strategy I'll demonstrate for mapping your domain class to a legacy table is using a static mapping block.
我将示范的第一个将域类映射到遗留表的策略是 使用静态 mapping块。
应用推荐