| commit | ae8f787827d9eb46f6c2beb7d0676b15efdccfda | [log] [tgz] |
|---|---|---|
| author | Graeme Rocher <graeme.rocher@gmail.com> | Mon Dec 04 01:47:28 2017 -0600 |
| committer | GitHub <noreply@github.com> | Mon Dec 04 01:47:28 2017 -0600 |
| tree | 9fab1f5c6d58b519531b3db88eaa07d174b6ddd2 | |
| parent | 73f89da85109e7942dff0a380465633cea19664c [diff] | |
| parent | 42b5d4f80207903a0c071075a9e64658234086b8 [diff] |
Merge pull request #1030 from JukinMediaInc/3.x Issue #878: backport of "make UUID a simple type" from GORM 5&6 to GORM 3
[Grails][Grails] is a framework used to build web applications with the [Groovy][Groovy] programming language. This project provides the plumbings for the GORM API both for Hibernate and for new implementations of GORM ontop of NoSQL datastores. [Grails]: http://grails.org/ [Groovy]: http://groovy.codehaus.org/
See the following links for documentation on the various implementations:
For API documentation see:
For other implementations see the following page.
Below is an example of using GORM for Hibernate in a Groovy script:
@Grab("org.grails:grails-datastore-gorm-hibernate4:3.0.0.RELEASE") @Grab("org.grails:grails-spring:2.3.6") @Grab("com.h2database:h2:1.3.164") import grails.orm.bootstrap.* import grails.persistence.* import org.springframework.jdbc.datasource.DriverManagerDataSource import org.h2.Driver init = new HibernateDatastoreSpringInitializer(Person) def dataSource = new DriverManagerDataSource(Driver.name, "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE", 'sa', '') init.configureForDataSource(dataSource) println "Total people = " + Person.count() @Entity class Person { String name static constraints = { name blank:false } }
For further information on the project see the comprehensive [developer guide][Developer Guide]. [Developer Guide]: http://projects.spring.io/grails-data-mapping/manual/index.html
Grails and Groovy are licensed under the terms of the [Apache License, Version 2.0][Apache License, Version 2.0]. [Apache License, Version 2.0]: http://www.apache.org/licenses/LICENSE-2.0.html