Question

I wrote the following domain class with its unit test. When I run the tests, I get the error message
No such property: admittedMobileUser. When I comment that line in domain class I get the same problem on other fields. Does anyone knows how to solve it?

class MobileUser {
    String userName
    String userDevice="Android"
    Integer userCluster
    Boolean admittedMobileUser
    Date lastTimeUpdatedUserSpaceTime=new Date()
    byte[] userSpaceTimeXml

    static constraints = {
        userName blank:false, unique:true
        userDevice blank:false
        userCluster validator : {val-> return val > 0}
        admittedMobileUser
        lastTimeUpdatedUserSpaceTime
        userSpaceTimeXml maxSize:1024*1024
    }

    String toString(){
        return "${userName}_${userCluster}"
    }

}
Was it helpful?

Solution

remove such rows from constraints :

    ....
    admittedMobileUser
    lastTimeUpdatedUserSpaceTime
    ....

or add minimum one constraint to each!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top