Top "Grails-domain-class" questions

deals with issues related to the definitions of domain model

dateCreated, lastUpdated fields in Grails 2.0

I've got an application that was using Grails 1.3.7 which I've just migrated to Grails 2.0. The application makes use of the …

grails gorm grails-domain-class grails-2.0
Grails domain class: unique constraint for multiple columns

Suppose a simple Grails domain class: class Account { String countryId; String userName; String password; static constraints = { ...???... } } It is required that …

grails orm unique-constraint grails-domain-class grails-validation
Grails Domain Class : hasOne, hasMany without belongsTo

I am new to Grails. Can I use "hasOne" or "hasMany" without using "belongsTo" to another domain-class? Thanks in advance.

grails gorm grails-domain-class domain-data-modelling
Grails: find domain class by name

I want to allow users to traverse the domain classes and print out dumps of stuff. My frist problem: assuming …

grails grails-domain-class servlets
How to set default value for Domain Class Values in Grails 2.2?

In my Grails domain class I want to set default values which do persist in the database. I use mysql …

grails grails-2.0 grails-domain-class
Grails default sort of "hasMany" domain attributes

I'm trying to set default sort of my hasMany attribute using mapping statement. I'm following the grails doc but it …

grails gorm grails-domain-class
Grails - how execute code before every save?

Is there a good/standard way to execute some common code before every save() invocation on domain classes? For example, …

grails gorm grails-domain-class
Grails get child domain objects

I have two domain classes one is parent and other one is child and i have a hasMany relationship between …

json grails grails-domain-class
Grails/Hibernate: No row with the given identifier exists

I have a domain as follow: class Author { String id static hasMany = [accounts: Account] static belongsTo = Account static mapping = { accounts …

java hibernate grails gorm grails-domain-class
How do I create a transient variable in a Grails Domain Class?

How do I set up a variable within a domain class that is not persistent. I want to be able …

grails grails-domain-class