gorm
- 网络高姆;戈尔牧;格尔姆;对象关联映射;对象关系映射
-
The mockDomain () method models GORM behavior as faithfully as possible .
mockDomain()方法尽可能忠实地建模GORM行为。
-
Again , notice that GORM allows you to think in terms of objects instead of primary or foreign keys .
同样地,我们注意到GORM也允许您从对象而不是主键或外键的角度来思考。
-
With that in mind , here is the GORM model for a story in the example application , shown in Listing 1 .
下面是针对示例应用程序中的新闻的GORM模型,如清单1所示。
-
You know , in the lrish language , the word for " black man " is fear gorm .
你知道吗,在爱尔兰语言中,“黑人”实际上代表害怕坑脏。
-
Before getting in to using GORM , let 's quickly discuss the application you will create and what you need to model with GORM .
在使用GORM之前,我们先快速讨论一下将要创建的应用程序,以及需要使用GORM进行建模的东西。
-
Later , in " Many-to-many relationships with a dollop of Ajax ," you used GORM to model increasingly sophisticated class relationships .
之后的“使用Ajax实现多对多关系”教您使用GORM建模越来越复杂的类关系。
-
GORM helps mitigate the leaky-abstraction problem by allowing you to represent your object model in a way that makes sense in Groovy .
GORM有助于缓解抽象泄漏问题,它支持使用对Groovy有意义的方式表示对象模型,由GORM在幕后处理关系数据库的问题。
-
When GORM adds a publisher_id field to the book table , you have a1 : m relationship between the two tables .
当GORM向book表添加一个publisherid字段时,就在两个表之间建立了一个1:m关系。
-
GORM uses the popular Hibernate library for generating database-specific and optimized SQL , and for managing the life cycles of domain objects .
GORM使用流行的Hibernate库生成特定于数据库的经过优化的SQL,以及管理域对象的生命周期。
-
In " GORM : Funny name , serious technology ," you were introduced to the basics of GORM , including simple one-to-many relationships .
“精通Grails:GORM-有趣的名称,严肃的技术”向您介绍了GORM的基础知识,包括简单的一对多关系。
-
GORM supports the registration of events as closures that get fired when certain events occurs such as deletes , inserts and updates .
GORM支持事件注册,只需要将事件作为一个闭包即可,当某个事件触发,比如删除,插入,更新。
-
As you learned in " GORM : Funny name , serious technology ," the text displayed in the list comes from the User . toString () method .
在“GORM-有趣的名称,严肃的技术”中可以了解到,列表中显示的文本来自User.toString()方法。
-
If you provide a couple of specially named fields ( lastUpdated and dateCreated ), GORM automatically timestamps the class .
如果你提供了一对特别命名的字段(lastUpdated与dateCreated),GORM就会自动为类增加时间戳。
-
The next statement tells Grails that the table does not have a version column . ( GORM normally creates one to help facilitate optimistic locking . )
下一条语句通知Grails表没有version列(GORM通常会创建一个version列来优化乐观锁定)。
-
Rather than adding a foreign key to either the Book or Author table , GORM adds book_id and author_id to the BookAuthor join table .
GORM向BookAuthor连接表添加bookid和authorid,而不是向Book或Author表添加一个外键。
-
GORM metaprograms a number of useful methods onto domain classes : save (), list (), and a whole host of dynamic finders such as findAllByRole () .
GORM将一些有用的方法元编程到域类上:save()、list()和许多定位程序,比如findAllByRole()。
-
If you are dealing with legacy tables , you should disable this feature so that GORM won 't disrupt the schema that other applications might be expecting .
因此,如果要处理遗留表的话,就一定要禁用该特性,这样GORM才不会破坏其他应用程序可能会用到的模式。
-
GORM creates a corresponding database table for each class , and the scaffolding gives you a basic Create / Retrieve / Update / Delete ( CRUD ) Web interface for free .
GORM为每个类创建对应的数据库表,搭建功能(scaffolding)提供基本的Create/Retrieve/Update/Delete(CRUD)Web界面。
-
Recall that GORM is a thin Groovy facade over Hibernate , so it shouldn 't surprise you that all of your old Hibernate tricks will still work .
回忆一下,GORM是一个优于Hibernate的瘦Groovyfacade,因此,那些古老的Hibernate技巧仍然奏效也不足为奇。
-
Most Web applications use a relational database to store and retrieve the data used in an application , and thus Grails comes with a powerful Object Relational Modeling ( ORM ) technology known as GORM .
许多Web应用程序都使用关系数据库存储和获取在某个应用程序中使用的数据,因此Grails采用了强大的ObjectRelationalModeling(ORM)技术,即GORM。
-
The benefit of an object-relational mapper such as GORM is that it seamlessly transforms data from a nonnative format ( stored in a relational database ) into Groovy .
对象关系映射器(比如GORM)的好处在于,它可以将数据从非原生格式(存储在关系数据库中)无缝地转换为Groovy。
-
Now you 'll see how the " ORM " in GORM has the flexibility to deal with table and column names in your legacy databases that don 't follow standard GORM naming conventions .
现在您将看到GORM的“ORM”如何能够灵活处理遗留数据库中不符合Grails标准命名约定的表名与列名。