grails-domain-class
Grails: how to return instance of domain class when using projections
I have a domain class which has around 20 properties. A findBy on the domain class results in a select query which has all the columns selected from the database, which can be a performance hit when t[详细]
2023-01-30 22:19 分类:问答GORM events not firing in integration tests
Trying to integration test Grails GORM delete on an object with beforeDelete event.Problem is that the beforeDelete event is not being fired in Integration Tests:[详细]
2023-01-29 05:18 分类:问答grails won't save but have no error
Hi I have a domain that so simple like the following // page 52 Bankruptcy Questions class FamilyLawFinancial{[详细]
2023-01-27 07:38 分类:问答How to ensure a boolean field to be set in Grails?
I want to ensure that one of two form fields representing a boolean value is checked. But there is no appropriate constraint to do this. nullable: false does not work.[详细]
2023-01-25 23:34 分类:问答Custom Grails validation
I would like to check to make sure two fields are not equal and one is greater then the other. Say yearBorn and yearMarried. They cannot be开发者_Go百科 equal and yearMarried must be greater then year[详细]
2023-01-24 18:58 分类:问答Grails Domain modification on save
Say I have a user domain class with fields username and password. For simplicity say I would like to store the passwords as a SHA-512 hash. I also want to validate the password prior to hashing it, bu[详细]
2023-01-24 18:44 分类:问答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 doesn\'t work for me (grails 1.3.5). My code looks like:[详细]
2023-01-24 14:10 分类:问答Grails min constraint for date validation
I am a newbie in grails and groovy. I have a Project domain-class with start and end date. I want to put in a constraint specifying that the end date needs to be greater than the start date(and then f[详细]
2023-01-23 08:55 分类:问答Grails: domain class mapping (collection of hibernate user types)
I am wondering if is possible to implement following domain model. Let\'s have a domain class which contains set of intervals (joda time). I can use org.joda.time.contrib.hibernate.PersistentInterval[详细]
2023-01-22 07:34 分类:问答Grails validation issue on multi-domain association?
I need to validate save action between 3 domains, here is relationship : User - JobProcess : one-to-many, JobProcess - Heatmap : one-to-many.[详细]
2023-01-21 04:17 分类:问答