Cannot obtain DBObject for transient instance, save a valid instance first with grails and mongodb -
cannot obtain dbobject transient instance, save valid instance first.
i using grails 2.2.1 , mongodb 1.2.0. there domain below.
class person{ static mapwith = "mongo" static hasmany = [categories:category , address:address]; string firstname; string lastname; string emailid; int age; string contactnumber; string sex; byte [] personimage; string identity; static constraints = { identity nullable: true , inlist:["driving license"] , unique: true; emailid email: true , unique: true contactnumber unique: true } }
when going save giving error.
Comments
Post a Comment