0

I developed application using grails 2.1.2 then I upgrade to 2.2.0

I have a domain class

class Concurrence {
    Concurrence parent = null
    Request request 
    Person approver
    int status = 0
    Date processed = null
}

class Request {
    String no
    Folder folder
    String fiscalYear
    String notes
    static hasOne = [category: Category, channel : Channel]
    Date created
    Date submitted = null
    Date approved = null
    Date updated
    Person requestor        
    int status = 0
    boolean deleted = false
    Person processedBy = null
    boolean processed = false
    Date processedDate = null

    static hasMany = [documents:RequestDocument, concurrences:Concurrence, approvals:Approval, finalApprovals:FinalApproval, memos:Memo]
}

there is a property 'request' on Concurrence

Previously everything is ok, but after I use grails 2.2.0, that domain can't be saved,

Field 'request_id' doesn't have a default value

any suggestion how to solved this problem? Or I must downgrade to 2.1.2 or rename request property name?

best regards

Wisnu
  • 16
  • 2

1 Answers1

0

The variable reqeust is a keyword in Grails that references the request object. With that said I think your first step should be picking a variable name that does not conflict with any default Grails objects.

ubiquibacon
  • 10,451
  • 28
  • 109
  • 179