I want to replace domain class in grails with a hibernate class(Rate). So constrains to hibernate class can be added by creating a file RateConstraints.groovy
in src/java, and it works fine for validations of hibernate class. now i need to add transients property to hibernate class using this RateConstraints.groovy
.
Eg:
Consider a java Class
class Rate {
Long id
String code
}
RateConstraints.groovy
file in ../src/java
constraints = {
id ( nullable:true )
code( nullable: false )
}
How can i add transients property in RateConstraints.groovy
file
transients = ['startDate', 'endDate']