How to initialize the domain class properties with the values of another Domain class properties in grails
I have grails 2.0.4 installed, I am stuck in setting the default values of domain classes I have a Domain Class ApplicationConfiguaration to store all the default values, I am initializing the property 'city' of Domain class City by using the dynamic finders, I have got a reply to my post that "do not use dynamic finders to initialize a fields value. If you need this behavior use the beforeValidate() or beforeInsert() events" But I need to show the default value to the user in create page, If I use beforeValidate() or beforeInsert() this will not be fulfilled, I have read that using beans we can initialize the domain class. I have tried settings plugin, Since it also uses dynamic finders, This also fails. and using constructor also failed The one solution I know is using Groovy Sql Is there any other way to do it
How about using a constructor?
Can't use get() in domain using Grails3
GORM findAll + cannot pass dynamic List as named parameter
How to display database records in grails
Configure Grails 3.0.9 for Oracle 12c with identity PK?
Adding condition to findAll and findAllBy methods
Neo4j and Mongodb as datasource in Grails
GORM (varchar .save(), non DATE): ORA-01861: literal does not match format string
GORM addTo methods not found in Spock test
spring-boot property exception while externalizing datasource properties and using actuator
Mapping hasMany relation and saving the related data
Method on class  was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails Correctly
What happens when two app servers in cluster start LiquiBase update (via Grails)?
use of mappedBy in Many to Many relationship in Grails
Domain class auto validation in grails
Grails Detached Criteria Query and “group by” and “having” clause
Script for saving large no of entries in mongodb