This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package 'packageName' | |
import 'whateverPackagesYouNeed' | |
// note: a GORM class can extend another - default behaviour is: they will be on same table | |
class User extends SecUser{ | |
// on IDs - you must either set yorseld - or choose generation method | |
String userId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grails create-domain-class 'classpath&classname' | |
grails create-controller 'classpath&classname' // for a domain class | |
grails create-view 'classpath&classname' // for a domain class | |
grails create-all 'classpath&classname' // for a domain class | |
grails generate-controller 'classpath&classname' // for a domain class | |
grails generate-view 'classpath&classname' // for a domain class | |
grails generate-all 'classpath&classname' // for a domain class | |
grails run-app 'appname' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> Using Redis Standalone > must uninstall the Hybernate plugin | |
grails uninstall-plugin hibernate | |
With this done all domain classes in grails-app/domain will be persisted via Redis and not Hibernate. | |
>> If you want to persist a particular domain class with Redis then you must use the mapWith property in the domain class: | |
static mapWith = "redis" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//method 1 | |
import java.util.UUID | |
uuid = UUID.randomUUID() | |
//method 2 | |
import static java.util.UUID.randomUUID | |
uuid = randomUUID() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BGREWRITEAOF - | |
summary: Asynchronously rewrite the append-only file | |
BGSAVE - | |
summary: Asynchronously save the dataset to disk | |
CONFIG GET parameter | |
summary: Get the value of a configuration parameter | |
CONFIG RESETSTAT - |