Atul Jain
Atul Jain

Reputation: 1085

Boolean value is not showing in Linux environment using Grails

I am using Grails 2.4.0.And create an application and deploy on linux.

My Domain is

class UserDetails {

  String  userEnvironment =   ""
  Long  userId          =   0L
  Boolean accountCreated  =   false
  Integer retries         =   0
  String  password        =   ""
  boolean accountCreationInProgress = true

 static constraints = {
    accountCreationInProgress nullable : true
 }

}

When saving its working fine on windows.But accountCreated and accountCreationInProgress column is blank on linux. Why don't know.

Anyone please help me out.

Upvotes: 0

Views: 83

Answers (1)

Michal_Szulc
Michal_Szulc

Reputation: 4177

Change to:

class UserDetails {

    StringuserEnvironment = ""
    LonguserId= 0L
    Boolean accountCreated= false
    Integer retries = 0
    Stringpassword= ""
    Boolean accountCreationInProgress = true

    static constraints = {
    //there is no point to use nullable for accountCreationInProgress if you set it default to true value during create
    }

}

Remember to drop table in database before rerun of app.

Upvotes: 1

Related Questions