Salil Vverma wrote:Where are you trying to save the object ? In file, in database or at some location in network?
if you are saving the object in database. are you using any ORM tool like Hibernate or using JDBC ?
I wanted to save in database..groovy/grails frame work uses GORM(Hibernate), now im able to save mutilple objects which i am sending through gsp
below how i tried
company and person have one to many relationship
def cname = params.cname
def companyInstance = new Comapany(name:cname)
companyInstance.save()
def name = params.name
def age = params.age
def personInstance = new Person(name:name,age:age)
personInstance.company = companyInstance
personInstance.save()