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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -