grails - While Generating controller and view getting error : Can not set int field lms.Book.bookId to java.lang.Class -
while generating controller , view domain class as:
class book { static constraints = { bookid blank:false booktitle blank:false } private int bookid private string booktitle private string author private double price private date edition private string publisher }
giving error saying : can not set int field lms.book.bookid java.lang.class
i think if u add 'private' field declaration, u have write getter , setter field:
class book { static constraints = { bookid blank:false booktitle blank:false } private integer bookid ... integer getbookid() { this.bookid } void setbookid(integer bookid) { this.bookid = bookid } .... }
Comments
Post a Comment